Skip to content

Commit

Permalink
Fixed issue EsotericSoftware#26: infinite loop due to unsynchronized …
Browse files Browse the repository at this point in the history
…HashMap put.

v1.03
  • Loading branch information
NathanSweet committed Sep 8, 2010
1 parent 3717cea commit 61059bc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions project.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
version: 1.03
dependencies:
- ../reflectasm
- ../minlog
7 changes: 4 additions & 3 deletions src/com/esotericsoftware/kryo/Kryo.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicInteger;

import com.esotericsoftware.kryo.serialize.ArraySerializer;
Expand All @@ -36,7 +37,7 @@
* @author Nathan Sweet <[email protected]>
*/
public class Kryo {
static public final String version = "1.03a";
static public final String version = "1.03";

static private final byte ID_NULL_OBJECT = 0;
static private final int ID_CLASS_NAME = 16383;
Expand All @@ -47,8 +48,8 @@ protected Context initialValue () {
}
};

private final IntHashMap<RegisteredClass> idToRegisteredClass = new IntHashMap(64);
private final HashMap<Class, RegisteredClass> classToRegisteredClass = new HashMap(64);
private final ConcurrentHashMap<Integer, RegisteredClass> idToRegisteredClass = new ConcurrentHashMap(64);
private final ConcurrentHashMap<Class, RegisteredClass> classToRegisteredClass = new ConcurrentHashMap(64);
private AtomicInteger nextClassID = new AtomicInteger(1);
private Object listenerLock = new Object();
private Listener[] listeners = {};
Expand Down

0 comments on commit 61059bc

Please sign in to comment.