Skip to content

Commit

Permalink
Small fixes for generics in OpaqueValue and LRUMemoryMapState
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoerdmulder committed Aug 9, 2012
1 parent 59116c6 commit 7b086e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/jvm/storm/trident/state/OpaqueValue.java
Expand Up @@ -17,14 +17,14 @@ public OpaqueValue(Long currTxid, T val) {
this(currTxid, val, null);
}

public OpaqueValue update(Long batchTxid, T newVal) {
public OpaqueValue<T> update(Long batchTxid, T newVal) {
T prev;
if(batchTxid!=null && batchTxid.equals(this.currTxid)) {
prev = this.prev;
} else {
prev = this.curr;
}
return new OpaqueValue(batchTxid, newVal, prev);
return new OpaqueValue<T>(batchTxid, newVal, prev);
}

public T get(Long batchTxid) {
Expand Down
2 changes: 1 addition & 1 deletion src/jvm/storm/trident/testing/LRUMemoryMapState.java
Expand Up @@ -50,7 +50,7 @@ public LRUMemoryMapState(int cacheSize, String id) {

@Override
public List<T> multiGet(List<List<Object>> keys) {
List<T> ret = new ArrayList();
List<T> ret = new ArrayList<T>();
for(List<Object> key: keys) {
ret.add(db.get(key));
}
Expand Down

0 comments on commit 7b086e5

Please sign in to comment.