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 2018/08/22 20:19:22 UTC

[4/7] tinkerpop git commit: Add null checking for configuration; Remove unused import

Add null checking for configuration;
Remove unused import


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

Branch: refs/heads/tp33
Commit: 6efd47da55c1d621714c481b21cf8b4494585680
Parents: bf94f43
Author: Justin Chu <15...@users.noreply.github.com>
Authored: Tue Aug 21 18:28:59 2018 -0400
Committer: Justin Chu <15...@users.noreply.github.com>
Committed: Tue Aug 21 18:28:59 2018 -0400

----------------------------------------------------------------------
 .../org/apache/tinkerpop/gremlin/util/TinkerGraphProvider.java     | 2 +-
 .../java/org/apache/tinkerpop/gremlin/AbstractGremlinTest.java     | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6efd47da/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/util/TinkerGraphProvider.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/util/TinkerGraphProvider.java b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/util/TinkerGraphProvider.java
index 7a87414..bd2d20b 100644
--- a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/util/TinkerGraphProvider.java
+++ b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/util/TinkerGraphProvider.java
@@ -85,7 +85,7 @@ public class TinkerGraphProvider extends AbstractGraphProvider {
             graph.close();
 
         // in the even the graph is persisted we need to clean up
-        final String graphLocation = configuration.getString(TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_LOCATION, null);
+        final String graphLocation = null != configuration ? configuration.getString(TinkerGraph.GREMLIN_TINKERGRAPH_GRAPH_LOCATION, null) : null;
         if (graphLocation != null) {
             final File f = new File(graphLocation);
             f.delete();

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6efd47da/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinTest.java
index 2ccf762..a614252 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinTest.java
@@ -41,7 +41,6 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashSet;
 import java.util.List;
-import java.util.Random;
 import java.util.Set;
 import java.util.function.Consumer;
 import java.util.stream.Collectors;