tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [30/50] [abbrv] tinkerpop git commit: Didn't account for a null value in the config
Date Mon, 10 Jul 2017 18:18:59 GMT
Didn't account for a null value in the config

When the warn message got added it didn't account for null configs. CTR


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

Branch: refs/heads/TINKERPOP-1698
Commit: 8880118d05465571663291e0a70c9a3df22bda5c
Parents: e12cc7c
Author: Stephen Mallette <spmva@genoprime.com>
Authored: Thu Jul 6 10:13:18 2017 -0400
Committer: Stephen Mallette <spmva@genoprime.com>
Committed: Thu Jul 6 10:13:18 2017 -0400

----------------------------------------------------------------------
 .../tinkerpop/gremlin/server/AbstractChannelizer.java       | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8880118d/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
index 0a784d9..476cdd5 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
@@ -200,16 +200,17 @@ public abstract class AbstractChannelizer extends ChannelInitializer<SocketChann
                 }
 
                 final MessageSerializer serializer = (MessageSerializer) clazz.newInstance();
-                final Map<String, Graph> graphsDefinedAtStartup = new HashMap<String,
Graph>();
+                final Map<String, Graph> graphsDefinedAtStartup = new HashMap<>();
                 for (String graphName : settings.graphs.keySet()) {
                     graphsDefinedAtStartup.put(graphName, graphManager.getGraph(graphName));
                 }
 
-                if (config.config.containsKey(AbstractGryoMessageSerializerV1d0.TOKEN_USE_MAPPER_FROM_GRAPH))
-                    logger.warn("{} utilizes the {} configuration setting which is deprecated
- prefer use of {}", config.className, AbstractGryoMessageSerializerV1d0.TOKEN_USE_MAPPER_FROM_GRAPH,
AbstractGryoMessageSerializerV1d0.TOKEN_IO_REGISTRIES);
+                if (config.config != null) {
+                    if (config.config.containsKey(AbstractGryoMessageSerializerV1d0.TOKEN_USE_MAPPER_FROM_GRAPH))
+                        logger.warn("{} utilizes the {} configuration setting which is deprecated
- prefer use of {}", config.className, AbstractGryoMessageSerializerV1d0.TOKEN_USE_MAPPER_FROM_GRAPH,
AbstractGryoMessageSerializerV1d0.TOKEN_IO_REGISTRIES);
 
-                if (config.config != null)
                     serializer.configure(config.config, graphsDefinedAtStartup);
+                }
 
                 return Optional.ofNullable(serializer);
             } catch (ClassNotFoundException cnfe) {


Mime
View raw message