Skip to content

Commit 4bf113e

Browse files
author
Lukas Molzberger
committed
1.4.20
1 parent 3e89350 commit 4bf113e

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<groupId>network.aika</groupId>
66
<artifactId>aika</artifactId>
77
<packaging>jar</packaging>
8-
<version>1.4.19</version>
8+
<version>1.4.20</version>
99
<name>aika</name>
1010
<url>https://aika.network</url>
1111
<description>An Artificial Intelligence for Knowledge Acquisition</description>

src/main/java/network/aika/storage/FSSuspensionCallbackImpl.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
import java.io.*;
2323
import java.util.Collections;
24+
import java.util.HashMap;
2425
import java.util.Map;
2526
import java.util.TreeMap;
2627
import java.util.concurrent.atomic.AtomicInteger;
@@ -36,7 +37,7 @@ public class FSSuspensionCallbackImpl implements SuspensionHook {
3637

3738
private AtomicInteger currentId = new AtomicInteger(0);
3839

39-
private Map<String, Integer> labels = Collections.synchronizedMap(new TreeMap<>());
40+
private Map<String, Integer> labels = Collections.synchronizedMap(new HashMap<>());
4041
private Map<Integer, long[]> index = Collections.synchronizedMap(new TreeMap<>());
4142

4243
private File path;
@@ -151,18 +152,18 @@ private File getFile(String prefix) {
151152
}
152153

153154
private void readIndex(DataInput in) throws IOException {
154-
currentId = new AtomicInteger(in.readInt());
155+
currentId = new AtomicInteger((int) in.readLong());
155156

156157
labels.clear();
157158
while(in.readBoolean()) {
158159
String l = in.readUTF();
159-
Integer id = in.readInt();
160+
Integer id = (int)in.readLong();
160161
labels.put(l, id);
161162
}
162163

163164
index.clear();
164165
while(in.readBoolean()) {
165-
Integer id = in.readInt();
166+
Integer id = (int)in.readLong();
166167
long[] pos = new long[2];
167168
pos[0] = in.readLong();
168169
pos[1] = in.readInt();

0 commit comments

Comments
 (0)