tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [31/50] tinkerpop git commit: TINKERPOP-1562 Use List of files to preserve order in script customzier
Date Fri, 16 Dec 2016 16:53:45 GMT
TINKERPOP-1562 Use List of files to preserve order in script customzier


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

Branch: refs/heads/TINKERPOP-1581
Commit: 2d49710b2f7a45453aa1165074440e704a007044
Parents: 8dc9b1f
Author: Stephen Mallette <spmva@genoprime.com>
Authored: Tue Nov 29 16:29:10 2016 -0500
Committer: Stephen Mallette <spmva@genoprime.com>
Committed: Fri Dec 2 06:31:50 2016 -0500

----------------------------------------------------------------------
 .../tinkerpop/gremlin/jsr223/DefaultScriptCustomizer.java       | 3 +--
 .../tinkerpop/gremlin/jsr223/ScriptFileGremlinPlugin.java       | 4 +++-
 .../tinkerpop/gremlin/jsr223/DefaultScriptCustomizerTest.java   | 5 ++---
 3 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2d49710b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/DefaultScriptCustomizer.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/DefaultScriptCustomizer.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/DefaultScriptCustomizer.java
index 9640f28..c996cae 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/DefaultScriptCustomizer.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/DefaultScriptCustomizer.java
@@ -24,7 +24,6 @@ import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
 import java.util.Collection;
 import java.util.List;
-import java.util.Set;
 import java.util.stream.Collectors;
 
 /**
@@ -37,7 +36,7 @@ public class DefaultScriptCustomizer implements ScriptCustomizer {
 
     private final Collection<List<String>> scripts;
 
-    public DefaultScriptCustomizer(final Set<File> files) {
+    public DefaultScriptCustomizer(final List<File> files) {
         this(files.stream().map(f -> {
             try {
                 return Files.lines(f.toPath(), StandardCharsets.UTF_8).collect(Collectors.toList());

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2d49710b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/ScriptFileGremlinPlugin.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/ScriptFileGremlinPlugin.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/ScriptFileGremlinPlugin.java
index 757001c..93ad9d8 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/ScriptFileGremlinPlugin.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/ScriptFileGremlinPlugin.java
@@ -20,8 +20,10 @@ package org.apache.tinkerpop.gremlin.jsr223;
 
 import java.io.File;
 import java.io.FileNotFoundException;
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Set;
 
 /**
@@ -44,7 +46,7 @@ public final class ScriptFileGremlinPlugin extends AbstractGremlinPlugin
{
     public static final class Builder {
 
         private final Set<String> appliesTo = new HashSet<>();
-        private Set<File> files = new HashSet<>();
+        private List<File> files = new ArrayList<>();
 
         private Builder() {}
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2d49710b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/jsr223/DefaultScriptCustomizerTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/jsr223/DefaultScriptCustomizerTest.java
b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/jsr223/DefaultScriptCustomizerTest.java
index 3e4da13..07ab770 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/jsr223/DefaultScriptCustomizerTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/jsr223/DefaultScriptCustomizerTest.java
@@ -23,10 +23,9 @@ import org.junit.Test;
 
 import java.io.File;
 import java.io.IOException;
+import java.util.ArrayList;
 import java.util.Collection;
-import java.util.HashSet;
 import java.util.List;
-import java.util.Set;
 
 import static org.junit.Assert.assertEquals;
 
@@ -39,7 +38,7 @@ public class DefaultScriptCustomizerTest {
     public void shouldOpenViaPropertiesFileConfig() throws IOException {
         final File scriptFile1 = TestHelper.generateTempFileFromResource(DefaultScriptCustomizerTest.class,
"script-customizer-1.groovy", ".groovy");
         final File scriptFile2 = TestHelper.generateTempFileFromResource(DefaultScriptCustomizerTest.class,
"script-customizer-2.groovy", ".groovy");
-        final Set<File> files = new HashSet<>();
+        final List<File> files = new ArrayList<>();
         files.add(scriptFile1);
         files.add(scriptFile2);
         final ScriptCustomizer scripts = new DefaultScriptCustomizer(files);


Mime
View raw message