You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2017/07/10 21:25:58 UTC
[16/50] [abbrv] tinkerpop git commit: Didn't account for a null value
in the config
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/402678b1
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/402678b1
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/402678b1
Branch: refs/heads/TINKERPOP-1427
Commit: 402678b1bb6bfb9f6c94dd1281969018d1b2637a
Parents: 77d6dfd
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Jul 6 10:13:18 2017 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Jul 6 10:17:49 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/402678b1/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) {