Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix up silliness in BinaryCacheStore
  • Loading branch information
cbeer committed Mar 12, 2013
1 parent 4416e90 commit 3aa1602
Showing 1 changed file with 3 additions and 5 deletions.
Expand Up @@ -12,7 +12,7 @@
public class BinaryCacheStore {

private static final String DATA_SUFFIX = "-data";
private final Object store;
private final BinaryStore store;
private final CacheStore low_level_store;

public BinaryCacheStore(BinaryStore store, CacheStore low_level_store) {
Expand All @@ -27,12 +27,10 @@ public BinaryCacheStore(BinaryStore store) {


public InputStream getInputStream(BinaryKey key) throws BinaryStoreException {
if(this.store instanceof BinaryStore) {
return ((BinaryStore) this.store).getInputStream(key);
} else if(this.store instanceof InfinispanBinaryStore) {
if(this.store instanceof InfinispanBinaryStore) {
return new StoreChunkInputStream(low_level_store, key.toString() + DATA_SUFFIX);
} else {
return null;
return this.store.getInputStream(key);
}
}
}

0 comments on commit 3aa1602

Please sign in to comment.