File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
src/main/java/network/aika/storage Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 2121
2222import java .io .*;
2323import java .util .Collections ;
24+ import java .util .HashMap ;
2425import java .util .Map ;
2526import java .util .TreeMap ;
2627import 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 ();
You can’t perform that action at this time.
0 commit comments