forked from EsotericSoftware/kryo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed issue EsotericSoftware#26: infinite loop due to unsynchronized …
…HashMap put. v1.03
- Loading branch information
1 parent
3717cea
commit 61059bc
Showing
2 changed files
with
8 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
version: 1.03 | ||
dependencies: | ||
- ../reflectasm | ||
- ../minlog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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; | ||
|
@@ -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; | ||
|
@@ -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 = {}; | ||
|