diff options
| author | abranson <andrew.branson@cern.ch> | 2011-09-28 14:56:15 +0200 |
|---|---|---|
| committer | abranson <andrew.branson@cern.ch> | 2011-09-28 14:56:15 +0200 |
| commit | e7b92e1640be005db77804f018e3cdbc2aff90cf (patch) | |
| tree | caab0ad3e97ad444e2df2ab8c50c1a3c49a5bcb8 /source/com/c2kernel/persistency/RemoteMap.java | |
| parent | 385ba566319734f37a3970822ea88a3622ad3970 (diff) | |
RemoteMap bugfix
Diffstat (limited to 'source/com/c2kernel/persistency/RemoteMap.java')
| -rw-r--r-- | source/com/c2kernel/persistency/RemoteMap.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/com/c2kernel/persistency/RemoteMap.java b/source/com/c2kernel/persistency/RemoteMap.java index bc17e3f..2147047 100644 --- a/source/com/c2kernel/persistency/RemoteMap.java +++ b/source/com/c2kernel/persistency/RemoteMap.java @@ -114,6 +114,7 @@ public class RemoteMap<V extends C2KLocalObject> extends TreeMap<String, V> impl public synchronized int getLastId() {
loadKeys();
+ if (size() == 0) return -1;
try {
return Integer.parseInt(lastKey());
} catch (NumberFormatException ex) {
@@ -238,7 +239,7 @@ public class RemoteMap<V extends C2KLocalObject> extends TreeMap<String, V> impl try {
synchronized(this) {
storage.put(mSysKey, value, mLocker);
- return putLocal(key, value);
+ return putLocal(key, value);
}
} catch (ClusterStorageException e) {
Logger.error(e);
|
