Repository: tinkerpop
Updated Branches:
  refs/heads/master 291526fd8 -> 345d162f0


Registered HashMap$TreeNode to Gryo CTR


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/55ebe13e
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/55ebe13e
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/55ebe13e

Branch: refs/heads/master
Commit: 55ebe13ed50b08ffbee13632a34462cf681efdb3
Parents: 6ea6fb8
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Aug 10 08:51:42 2017 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Aug 10 09:06:38 2017 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                 |  1 +
 .../gremlin/structure/io/gryo/GryoVersion.java     | 17 +++++++++++++++--
 2 files changed, 16 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/55ebe13e/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 767ba09..5809c26 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -28,6 +28,7 @@ TinkerPop 3.2.6 (Release Date: NOT OFFICIALLY RELEASED YET)
 
 This release also includes changes from <<release-3-1-8, 3.1.8>>.
 
+* Registered `HashMap$TreeNode` to Gryo.
 * Fixed a lambda-leak in `SackValueStep` where `BiFunction` must be tested for 
true lambda status.
 * Allowed access to `InjectStep.injections` for `TraversalStrategy` analysis.
 * Exceptions that occur during result iteration in Gremlin Server will now 
return `SCRIPT_EVALUATION_EXCEPTION` rather than `SERVER_ERROR`.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/55ebe13e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoVersion.java
----------------------------------------------------------------------
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoVersion.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoVersion.java
index d581559..f7e5a1d 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoVersion.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoVersion.java
@@ -122,6 +122,7 @@ import java.util.TimeZone;
 import java.util.TreeMap;
 import java.util.TreeSet;
 import java.util.UUID;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.atomic.AtomicLong;
 
 /**
@@ -181,7 +182,7 @@ public enum GryoVersion {
             add(GryoTypeReg.of(BigDecimal.class, 35));
             add(GryoTypeReg.of(Calendar.class, 39));
             add(GryoTypeReg.of(Class.class, 41, new 
UtilSerializers.ClassSerializer()));
-            add(GryoTypeReg.of(Class[].class, 166, new 
UtilSerializers.ClassArraySerializer())); // ***LAST ID***
+            add(GryoTypeReg.of(Class[].class, 166, new 
UtilSerializers.ClassArraySerializer()));
             add(GryoTypeReg.of(Collection.class, 37));
             add(GryoTypeReg.of(Collections.EMPTY_LIST.getClass(), 51));
             add(GryoTypeReg.of(Collections.EMPTY_MAP.getClass(), 52));
@@ -203,10 +204,13 @@ public enum GryoVersion {
             add(GryoTypeReg.of(HashMap.class, 11));
             add(GryoTypeReg.of(HashMap.Entry.class, 16));
             add(GryoTypeReg.of(Types.HASH_MAP_NODE, 92));
+            add(GryoTypeReg.of(Types.HASH_MAP_TREE_NODE, 170));                
  // ***LAST ID***
             add(GryoTypeReg.of(KryoSerializable.class, 36));
             add(GryoTypeReg.of(LinkedHashMap.class, 47));
             add(GryoTypeReg.of(LinkedHashSet.class, 71));
             add(GryoTypeReg.of(LinkedList.class, 116));
+            add(GryoTypeReg.of(ConcurrentHashMap.class, 168));
+            add(GryoTypeReg.of(ConcurrentHashMap.Entry.class, 169));
             add(GryoTypeReg.of(Types.LINKED_HASH_MAP_ENTRY_CLASS, 15));
             add(GryoTypeReg.of(Locale.class, 22));
             add(GryoTypeReg.of(StringBuffer.class, 43));
@@ -322,14 +326,23 @@ public enum GryoVersion {
          */
         private static final Class HASH_MAP_NODE;
 
+        private static final Class HASH_MAP_TREE_NODE;
+
         static {
             // have to instantiate this via reflection because it is a private 
inner class of HashMap
-            final String className = HashMap.class.getName() + "$Node";
+            String className = HashMap.class.getName() + "$Node";
             try {
                 HASH_MAP_NODE = Class.forName(className);
             } catch (Exception ex) {
                 throw new RuntimeException("Could not access " + className, 
ex);
             }
+
+            className = HashMap.class.getName() + "$TreeNode";
+            try {
+                HASH_MAP_TREE_NODE = Class.forName(className);
+            } catch (Exception ex) {
+                throw new RuntimeException("Could not access " + className, 
ex);
+            }
         }
     }
 }

Reply via email to