tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [5/8] tinkerpop git commit: TINKERPOP-1654: use deserializatinoContext in `typeFromId()`.
Date Wed, 29 Mar 2017 14:12:24 GMT
TINKERPOP-1654: use deserializatinoContext in `typeFromId()`.


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

Branch: refs/heads/tp32
Commit: ad268ef4f784d8de0be7650e93e6ab750e3010d5
Parents: 380646c
Author: Kevin Gallardo <kevin.gallardo@datastax.com>
Authored: Tue Mar 28 10:10:14 2017 -0400
Committer: Kevin Gallardo <kevin.gallardo@datastax.com>
Committed: Tue Mar 28 10:10:14 2017 -0400

----------------------------------------------------------------------
 .../gremlin/structure/io/graphson/GraphSONTypeDeserializer.java    | 2 +-
 .../gremlin/structure/io/graphson/GraphSONTypeIdResolver.java      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ad268ef4/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeDeserializer.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeDeserializer.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeDeserializer.java
index 6734506..ceddcc2 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeDeserializer.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeDeserializer.java
@@ -154,7 +154,7 @@ public class GraphSONTypeDeserializer extends TypeDeserializerBase {
 
                 if (typeName != null && valueDetected) {
                     // Type has been detected pattern detected.
-                    final JavaType typeFromId = idRes.typeFromId(null, typeName);
+                    final JavaType typeFromId = idRes.typeFromId(deserializationContext,
typeName);
 
                     if (!baseType.isJavaLangObject() && !baseType.equals(typeFromId))
{
                         throw new InstantiationException(

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ad268ef4/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeIdResolver.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeIdResolver.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeIdResolver.java
index dda06e2..db2ef5c 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeIdResolver.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeIdResolver.java
@@ -97,7 +97,7 @@ public class GraphSONTypeIdResolver implements TypeIdResolver {
         return getIdToType().containsKey(s)
                 ? getIdToType().get(s)
                 // TODO: shouldn't we fail instead, if the type is not found? Or log something?
-                : TypeFactory.defaultInstance().constructType(String.class);
+                : databindContext.constructType(String.class);
     }
 
     @Override


Mime
View raw message