diff options
Diffstat (limited to 'source/com/c2kernel/persistency')
| -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);
|
