Removed some previously deprecated structures

These deprecations were typically pretty old, going back to 3.2.x and were 
generally for internal or provider usage. They were an odd mismatch of things 
so I didn't bother to createa JIRA for them, but documented them all fully in 
changelog and upgrade docs. CTR


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

Branch: refs/heads/TINKERPOP-1967
Commit: b75cfb8ec529aad957d5a631b15cc3afcf86186f
Parents: d5b54fe
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Jun 5 09:16:55 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Jun 5 09:16:55 2018 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  4 +
 docs/src/upgrade/release-3.4.x.asciidoc         |  9 ++-
 .../step/map/LambdaCollectingBarrierStep.java   | 13 ----
 .../traversal/step/util/HasContainer.java       | 18 -----
 .../Process/Traversal/GraphTraversal.cs         |  9 ---
 .../jsr223/GremlinGroovyScriptEngine.java       | 13 +---
 ...mlinGroovyScriptEngineCompileStaticTest.java | 29 ++++----
 ...remlinGroovyScriptEngineFileSandboxTest.java | 43 ++++++-----
 ...GroovyScriptEngineSandboxedStandardTest.java | 78 ++++++++++----------
 ...nGroovyScriptEngineTinkerPopSandboxTest.java | 17 +++--
 ...remlinGroovyScriptEngineTypeCheckedTest.java | 29 ++++----
 .../lib/process/graph-traversal.js              | 10 ---
 .../gremlin_python/process/graph_traversal.py   |  4 -
 .../hadoop/structure/HadoopConfiguration.java   | 24 ------
 14 files changed, 111 insertions(+), 189 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b75cfb8e/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 14b084c..75974c0 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -34,12 +34,16 @@ This release also includes changes from <<release-3-3-3, 
3.3.3>>.
 * Removed previously deprecated Credentials DSL infrastructure.
 * Moved `TraversalEngine` to `gremlin-test` as it has long been only used in 
testing infrastructure.
 * Removed previously deprecated `OpSelectorHandler` constructor.
+* Removed previously deprecated `close()` from `GremlinGroovyScriptEngine` 
which no longer implements `AutoCloseable`.
+* Removed previously deprecated `getGraphInputFormat()` and 
`getGraphOutputFormat()` from `HadoopConfiguration`.
 * Removed previously deprecated `AbstractOpProcessor#makeFrame()` method.
 * Removed previously deprecated `AuthenticationSettings.className` 
configuration option in Gremlin Server.
 * Removed previously deprecated `GraphManager` methods `getGraphs()` and 
`getTraversalSources()`.
 * Removed previously deprecated Gremlin Server setting for 
`serializedResponseTimeout`.
 * Removed previously deprecated Structure API exceptions related to "element 
not found" situations.
 * Removed previously deprecated `rebindings` options from the Java driver API.
+* Removed previously deprecated `LambdaCollectingBarrierStep.Consumers` enum.
+* Removed previously deprecated `HasContainer#makeHasContainers(String, P)`
 * Removed support for Giraph.
 
 == TinkerPop 3.3.0 (Gremlin Symphony #40 in G Minor)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b75cfb8e/docs/src/upgrade/release-3.4.x.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.4.x.asciidoc 
b/docs/src/upgrade/release-3.4.x.asciidoc
index 3c881c3..98b6045 100644
--- a/docs/src/upgrade/release-3.4.x.asciidoc
+++ b/docs/src/upgrade/release-3.4.x.asciidoc
@@ -82,8 +82,10 @@ gremlin> g.V().values('name').max()
 The following deprecated classes, methods or fields have been removed in this 
version:
 
 * `gremlin-core`
-** `org.apache.tinkerpop.gremlin.process.traversal.engine.*`
 ** `org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine`
+** `org.apache.tinkerpop.gremlin.process.traversal.engine.*`
+** 
`org.apache.tinkerpop.gremlin.process.traversal.step.map.LambdaCollectingBarrierStep.Consumers`
+** 
`org.apache.tinkerpop.gremlin.process.traversal.step.util.HasContainer#makeHasContainers(String,
 P)`
 ** 
`org.apache.tinkerpop.gremlin.structure.Element.Exceptions#elementAlreadyRemoved(Class,
 Object)`
 ** 
`org.apache.tinkerpop.gremlin.structure.Graph.Exceptions#elementNotFound(Class, 
Object)`
 ** 
`org.apache.tinkerpop.gremlin.structure.Graph.Exceptions#elementNotFound(Class, 
Object, Exception)`
@@ -91,6 +93,8 @@ The following deprecated classes, methods or fields have been 
removed in this ve
 ** `org.apache.tinkerpop.gremlin.driver.Client#rebind(String)`
 ** `org.apache.tinkerpop.gremlin.driver.Client.ReboundClusterdClient`
 ** `org.apache.tinkerpop.gremlin.driver.Tokens#ARGS_REBINDINGS`
+* `gremlin-groovy`
+** 
`org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.close()` 
- no longer implements `AutoCloseable`
 * `gremlin-server`
 ** `org.apache.tinkerpop.gremlin.server.GraphManager#getGraphs()`
 ** `org.apache.tinkerpop.gremlin.server.GraphManager#getTraversalSources()`
@@ -98,6 +102,9 @@ The following deprecated classes, methods or fields have 
been removed in this ve
 ** 
`org.apache.tinkerpop.gremlin.server.Settings.AuthenticationSettings#className`
 ** `org.apache.tinkerpop.gremlin.server.handler.OpSelectorHandler(Settings, 
GraphManager, GremlinExecutor, ScheduledExecutorService)`
 ** 
`org.apache.tinkerpop.gremlin.server.op.AbstractOpProcessor#makeFrame(ChannelHandlerContext,
 RequestMessage, MessageSerializer serializer, boolean, List, 
ResponseStatusCode code)`
+* `hadoop-graph`
+** 
`org.apache.tinkerpop.gremlin.hadoop.structure.HadoopConfiguration#getGraphInputFormat()`
+** 
`org.apache.tinkerpop.gremlin.hadoop.structure.HadoopConfiguration#getGraphOutputFormat()`
 
 Please see the javadoc deprecation notes or upgrade documentation specific to 
when the deprecation took place to
 understand how to resolve this breaking change.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b75cfb8e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/LambdaCollectingBarrierStep.java
----------------------------------------------------------------------
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/LambdaCollectingBarrierStep.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/LambdaCollectingBarrierStep.java
index 9b500d4..ef41b61 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/LambdaCollectingBarrierStep.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/LambdaCollectingBarrierStep.java
@@ -32,19 +32,6 @@ import java.util.function.Consumer;
  */
 public final class LambdaCollectingBarrierStep<S> extends 
CollectingBarrierStep<S> implements LambdaHolder {
 
-    /**
-     * @deprecated As of release 3.2.0, replaced by use of {@link 
NoOpBarrierStep}.
-     */
-    @Deprecated
-    public enum Consumers implements Consumer<TraverserSet<Object>> {
-        noOp {
-            @Override
-            public void accept(final TraverserSet<Object> traverserSet) {
-
-            }
-        }
-    }
-
     private final Consumer<TraverserSet<S>> barrierConsumer;
 
     public LambdaCollectingBarrierStep(final Traversal.Admin traversal, final 
Consumer<TraverserSet<S>> barrierConsumer, final int maxBarrierSize) {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b75cfb8e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/HasContainer.java
----------------------------------------------------------------------
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/HasContainer.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/HasContainer.java
index 08ab389..9e3ab91 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/HasContainer.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/HasContainer.java
@@ -182,22 +182,4 @@ public class HasContainer implements Serializable, 
Cloneable, Predicate<Element>
         }
         return true;
     }
-
-
-    /**
-     * @deprecated As of release 3.2.4. Providers should handle composite 
{@link P#and} predicates and not rely on splitting.
-     */
-    @Deprecated
-    public static HasContainer[] makeHasContainers(final String key, final 
P<?> predicate) {
-        if (predicate instanceof AndP) {
-            final List<P<?>> predicates = ((AndP) predicate).getPredicates();
-            final HasContainer[] hasContainers = new 
HasContainer[predicates.size()];
-            for (int i = 0; i < predicates.size(); i++) {
-                hasContainers[i] = new HasContainer(key, predicates.get(i));
-            }
-            return hasContainers;
-        } else {
-            return new HasContainer[]{new HasContainer(key, predicate)};
-        }
-    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b75cfb8e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs 
b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
index bb3d5d8..9952455 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
@@ -1676,14 +1676,5 @@ namespace Gremlin.Net.Process.Traversal
             return Wrap<S, E>(this);
         }
 
-        /// <summary>
-        ///     Adds the with step to this <see cref="GraphTraversal{SType, 
EType}" />.
-        /// </summary>
-        public GraphTraversal<S, E> With (StepConfiguration modulation)
-        {
-            Bytecode.AddStep("with", modulation);
-            return Wrap<S, E>(this);
-        }
-
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b75cfb8e/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
----------------------------------------------------------------------
diff --git 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
index 03ea883..e2af3aa 100644
--- 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
+++ 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java
@@ -29,7 +29,6 @@ import groovy.lang.MissingMethodException;
 import groovy.lang.MissingPropertyException;
 import groovy.lang.Script;
 import groovy.lang.Tuple;
-import org.apache.commons.lang.exception.ExceptionUtils;
 import org.apache.tinkerpop.gremlin.groovy.loaders.GremlinLoader;
 import org.apache.tinkerpop.gremlin.jsr223.ConcurrentBindings;
 import org.apache.tinkerpop.gremlin.jsr223.CoreGremlinPlugin;
@@ -89,8 +88,7 @@ import java.util.stream.Collectors;
  * @author Stephen Mallette (http://stephen.genoprime.com)
  * @see org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor
  */
-public class GremlinGroovyScriptEngine extends GroovyScriptEngineImpl
-        implements AutoCloseable, GremlinScriptEngine {
+public class GremlinGroovyScriptEngine extends GroovyScriptEngineImpl 
implements GremlinScriptEngine {
 
     private static final Logger log = 
LoggerFactory.getLogger(GremlinGroovyScriptEngine.class);
     /**
@@ -310,15 +308,6 @@ public class GremlinGroovyScriptEngine extends 
GroovyScriptEngineImpl
     }
 
     /**
-     * @deprecated As of release 3.2.4, not replaced as this class will not 
implement {@code AutoCloseable} in the
-     * future.
-     */
-    @Override
-    @Deprecated
-    public void close() throws Exception {
-    }
-
-    /**
      * Resets the entire {@code GremlinGroovyScriptEngine} by clearing script 
caches, recreating the classloader,
      * clearing bindings.
      */

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b75cfb8e/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineCompileStaticTest.java
----------------------------------------------------------------------
diff --git 
a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineCompileStaticTest.java
 
b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineCompileStaticTest.java
index b5949a2..f6bea6e 100644
--- 
a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineCompileStaticTest.java
+++ 
b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineCompileStaticTest.java
@@ -37,12 +37,12 @@ public class GremlinGroovyScriptEngineCompileStaticTest {
     @Test
     public void shouldCompileStatic() throws Exception {
         // with no type checking this should pass
-        try (GremlinGroovyScriptEngine scriptEngine = new 
GremlinGroovyScriptEngine()) {
-            assertEquals(255, scriptEngine.eval("((Object) new 
java.awt.Color(255, 255, 255)).getRed()"));
-        }
+        GremlinGroovyScriptEngine scriptEngine = new 
GremlinGroovyScriptEngine();
+        assertEquals(255, scriptEngine.eval("((Object) new java.awt.Color(255, 
255, 255)).getRed()"));
 
         final CompileStaticGroovyCustomizer provider = new 
CompileStaticGroovyCustomizer();
-        try (GremlinGroovyScriptEngine scriptEngine = new 
GremlinGroovyScriptEngine(provider)) {
+        scriptEngine = new GremlinGroovyScriptEngine(provider);
+        try {
             scriptEngine.eval("((Object) new java.awt.Color(255, 255, 
255)).getRed()");
             fail("Should have failed type checking");
         } catch (ScriptException se) {
@@ -56,13 +56,13 @@ public class GremlinGroovyScriptEngineCompileStaticTest {
     public void shouldCompileStaticWithExtension() throws Exception {
         // with no type checking extension this should pass
         final CompileStaticGroovyCustomizer providerNoExtension = new 
CompileStaticGroovyCustomizer();
-        try (GremlinGroovyScriptEngine scriptEngine = new 
GremlinGroovyScriptEngine(providerNoExtension)) {
-            assertEquals(255, scriptEngine.eval("def c = new 
java.awt.Color(255, 255, 255); c.red"));
-        }
+        GremlinGroovyScriptEngine scriptEngine = new 
GremlinGroovyScriptEngine(providerNoExtension);
+        assertEquals(255, scriptEngine.eval("def c = new java.awt.Color(255, 
255, 255); c.red"));
 
         final CompileStaticGroovyCustomizer providerWithExtension = new 
CompileStaticGroovyCustomizer(
                 
PrecompiledExtensions.PreventColorUsageExtension.class.getName());
-        try (GremlinGroovyScriptEngine scriptEngine = new 
GremlinGroovyScriptEngine(providerWithExtension)) {
+        scriptEngine = new GremlinGroovyScriptEngine(providerWithExtension);
+        try {
             scriptEngine.eval("def c = new java.awt.Color(255, 255, 255); 
c.red");
             fail("Should have failed type checking");
         } catch (ScriptException se) {
@@ -75,15 +75,15 @@ public class GremlinGroovyScriptEngineCompileStaticTest {
     public void shouldCompileStaticWithMultipleExtension() throws Exception {
         // with no type checking extension this should pass
         final CompileStaticGroovyCustomizer providerNoExtension = new 
CompileStaticGroovyCustomizer();
-        try (GremlinGroovyScriptEngine scriptEngine = new 
GremlinGroovyScriptEngine(providerNoExtension)) {
-            assertEquals(255, scriptEngine.eval("def c = new 
java.awt.Color(255, 255, 255); c.red"));
-            assertEquals(1l, scriptEngine.eval("def c = new 
java.util.concurrent.CountDownLatch(1); c.count"));
-        }
+        GremlinGroovyScriptEngine scriptEngine = new 
GremlinGroovyScriptEngine(providerNoExtension);
+        assertEquals(255, scriptEngine.eval("def c = new java.awt.Color(255, 
255, 255); c.red"));
+        assertEquals(1l, scriptEngine.eval("def c = new 
java.util.concurrent.CountDownLatch(1); c.count"));
 
         final CompileStaticGroovyCustomizer providerWithExtension = new 
CompileStaticGroovyCustomizer(
                 
PrecompiledExtensions.PreventColorUsageExtension.class.getName() +
                         "," + 
PrecompiledExtensions.PreventCountDownLatchUsageExtension.class.getName());
-        try (GremlinGroovyScriptEngine scriptEngine = new 
GremlinGroovyScriptEngine(providerWithExtension)) {
+        scriptEngine = new GremlinGroovyScriptEngine(providerWithExtension);
+        try {
             scriptEngine.eval("def c = new java.awt.Color(255, 255, 255); 
c.red");
             fail("Should have failed type checking");
         } catch (ScriptException se) {
@@ -91,7 +91,8 @@ public class GremlinGroovyScriptEngineCompileStaticTest {
             assertThat(se.getMessage(), containsString("Method call is not 
allowed!"));
         }
 
-        try (GremlinGroovyScriptEngine scriptEngine = new 
GremlinGroovyScriptEngine(providerWithExtension)) {
+        scriptEngine = new GremlinGroovyScriptEngine(providerWithExtension);
+        try {
             scriptEngine.eval("def c = new 
java.util.concurrent.CountDownLatch(1); c.count");
             fail("Should have failed type checking");
         } catch (ScriptException se) {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b75cfb8e/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineFileSandboxTest.java
----------------------------------------------------------------------
diff --git 
a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineFileSandboxTest.java
 
b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineFileSandboxTest.java
index 12925b8..c92581a 100644
--- 
a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineFileSandboxTest.java
+++ 
b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineFileSandboxTest.java
@@ -70,35 +70,33 @@ public class GremlinGroovyScriptEngineFileSandboxTest {
         final File f = 
TestHelper.generateTempFileFromResource(graph.getClass(), 
GremlinGroovyScriptEngineFileSandboxTest.class, 
"sandbox-empty-static-variable-types.yaml", ".yaml");
         System.setProperty(FileSandboxExtension.GREMLIN_SERVER_SANDBOX, 
f.getAbsolutePath());
         final CompileStaticGroovyCustomizer standardSandbox = new 
CompileStaticGroovyCustomizer(FileSandboxExtension.class.getName());
-        try (GremlinGroovyScriptEngine engine = new 
GremlinGroovyScriptEngine(standardSandbox)) {
-            assertEquals(123, engine.eval("java.lang.Math.abs(-123)"));
-            assertThat(engine.eval("new Boolean(true)"), is(true));
-            assertThat(engine.eval("new Boolean(true).toString()"), 
is("true"));
-        }
+        final GremlinGroovyScriptEngine engine = new 
GremlinGroovyScriptEngine(standardSandbox);
+        assertEquals(123, engine.eval("java.lang.Math.abs(-123)"));
+        assertThat(engine.eval("new Boolean(true)"), is(true));
+        assertThat(engine.eval("new Boolean(true).toString()"), is("true"));
     }
 
     @Test
     public void shouldEvalAsTheMethodIsWhiteListed() throws Exception {
         final CompileStaticGroovyCustomizer standardSandbox = new 
CompileStaticGroovyCustomizer(FileSandboxExtension.class.getName());
-        try (GremlinGroovyScriptEngine engine = new 
GremlinGroovyScriptEngine(standardSandbox)) {
-            assertEquals(123, engine.eval("java.lang.Math.abs(-123)"));
-            assertThat(engine.eval("new Boolean(true)"), is(true));
-            assertThat(engine.eval("new Boolean(true).toString()"), 
is("true"));
-        }
+        final GremlinGroovyScriptEngine engine = new 
GremlinGroovyScriptEngine(standardSandbox);
+        assertEquals(123, engine.eval("java.lang.Math.abs(-123)"));
+        assertThat(engine.eval("new Boolean(true)"), is(true));
+        assertThat(engine.eval("new Boolean(true).toString()"), is("true"));
     }
 
     @Test
     public void shouldEvalAsGroovyPropertiesWhenWhiteListed() throws Exception 
{
         final CompileStaticGroovyCustomizer standardSandbox = new 
CompileStaticGroovyCustomizer(FileSandboxExtension.class.getName());
-        try (GremlinGroovyScriptEngine engine = new 
GremlinGroovyScriptEngine(standardSandbox)) {
-            assertThat(Arrays.equals("test".getBytes(), (byte[]) 
engine.eval("'test'.bytes")), is(true));
-        }
+        final GremlinGroovyScriptEngine engine = new 
GremlinGroovyScriptEngine(standardSandbox);
+        assertThat(Arrays.equals("test".getBytes(), (byte[]) 
engine.eval("'test'.bytes")), is(true));
     }
 
     @Test
     public void 
shouldPreventMaliciousStuffWithSystemButAllowSomeMethodsOnSystem() throws 
Exception {
         final CompileStaticGroovyCustomizer standardSandbox = new 
CompileStaticGroovyCustomizer(FileSandboxExtension.class.getName());
-        try (GremlinGroovyScriptEngine engine = new 
GremlinGroovyScriptEngine(standardSandbox)) {
+        final GremlinGroovyScriptEngine engine = new 
GremlinGroovyScriptEngine(standardSandbox);
+        try {
             assertThat((long) engine.eval("System.currentTimeMillis()"), 
greaterThan(0L));
             assertThat((long) engine.eval("System.nanoTime()"), 
greaterThan(0L));
 
@@ -113,7 +111,8 @@ public class GremlinGroovyScriptEngineFileSandboxTest {
     @Test
     public void shouldPreventMaliciousStuffWithFile() throws Exception {
         final CompileStaticGroovyCustomizer standardSandbox = new 
CompileStaticGroovyCustomizer(FileSandboxExtension.class.getName());
-        try (GremlinGroovyScriptEngine engine = new 
GremlinGroovyScriptEngine(standardSandbox)) {
+        final GremlinGroovyScriptEngine engine = new 
GremlinGroovyScriptEngine(standardSandbox);
+        try {
             engine.eval("java.nio.file.FileSystems.getDefault()");
             fail("Should have a compile error because class/method is not 
white listed");
         } catch (Exception ex) {
@@ -126,13 +125,13 @@ public class GremlinGroovyScriptEngineFileSandboxTest {
     @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
     public void shouldEvalOnGAsTheMethodIsWhiteListed() throws Exception {
         final CompileStaticGroovyCustomizer standardSandbox = new 
CompileStaticGroovyCustomizer(FileSandboxExtension.class.getName());
-        try (GremlinGroovyScriptEngine engine = new 
GremlinGroovyScriptEngine(standardSandbox)) {
-            final Bindings bindings = engine.createBindings();
-            bindings.put("g", g);
-            bindings.put("marko", convertToVertexId(graph, "marko"));
-            assertEquals(g.V(convertToVertexId(graph, "marko")).next(), 
engine.eval("g.V(marko).next()", bindings));
-            assertEquals(g.V(convertToVertexId(graph, 
"marko")).out("created").count().next(), 
engine.eval("g.V(marko).out(\"created\").count().next()", bindings));
-        }
+        final GremlinGroovyScriptEngine engine = new 
GremlinGroovyScriptEngine(standardSandbox);
+
+        final Bindings bindings = engine.createBindings();
+        bindings.put("g", g);
+        bindings.put("marko", convertToVertexId(graph, "marko"));
+        assertEquals(g.V(convertToVertexId(graph, "marko")).next(), 
engine.eval("g.V(marko).next()", bindings));
+        assertEquals(g.V(convertToVertexId(graph, 
"marko")).out("created").count().next(), 
engine.eval("g.V(marko).out(\"created\").count().next()", bindings));
     }
 
     private Object convertToVertexId(final Graph graph, final String 
vertexName) {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b75cfb8e/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineSandboxedStandardTest.java
----------------------------------------------------------------------
diff --git 
a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineSandboxedStandardTest.java
 
b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineSandboxedStandardTest.java
index c3bac74..b203ba8 100644
--- 
a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineSandboxedStandardTest.java
+++ 
b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineSandboxedStandardTest.java
@@ -61,15 +61,15 @@ public class GremlinGroovyScriptEngineSandboxedStandardTest 
{
     public void shouldEvalGraphTraversalSource() throws Exception {
         final Graph graph = TinkerFactory.createModern();
         final GraphTraversalSource g = graph.traversal();
-        try (GremlinGroovyScriptEngine engine = new 
GremlinGroovyScriptEngine()) {
-            final Bindings bindings = engine.createBindings();
-            bindings.put("g", g);
-            bindings.put("marko", convertToVertexId(graph, "marko"));
-            assertEquals(g.V(convertToVertexId(graph, "marko")).next(), 
engine.eval("g.V(marko).next()", bindings));
-        }
-
-        try (GremlinGroovyScriptEngine engine = new 
GremlinGroovyScriptEngine(notSandboxed)) {
-            final Bindings bindings = engine.createBindings();
+        GremlinGroovyScriptEngine engine = new GremlinGroovyScriptEngine();
+        Bindings bindings = engine.createBindings();
+        bindings.put("g", g);
+        bindings.put("marko", convertToVertexId(graph, "marko"));
+        assertEquals(g.V(convertToVertexId(graph, "marko")).next(), 
engine.eval("g.V(marko).next()", bindings));
+
+        engine = new GremlinGroovyScriptEngine(notSandboxed);
+        try {
+            bindings = engine.createBindings();
             bindings.put("g", g);
             bindings.put("marko", convertToVertexId(graph, "marko"));
             engine.eval("g.V(marko).next()", bindings);
@@ -79,28 +79,27 @@ public class GremlinGroovyScriptEngineSandboxedStandardTest 
{
             assertThat(ex.getMessage(), containsString("The variable [g] is 
undeclared."));
         }
 
-        try (GremlinGroovyScriptEngine engine = new 
GremlinGroovyScriptEngine(sandboxed)) {
-            final Bindings bindings = engine.createBindings();
-            bindings.put("g", g);
-            bindings.put("marko", convertToVertexId(graph, "marko"));
-            assertEquals(g.V(convertToVertexId(graph, "marko")).next(), 
engine.eval("g.V(marko).next()", bindings));
-            assertEquals(g.V(convertToVertexId(graph, 
"marko")).out("created").count().next(), 
engine.eval("g.V(marko).out(\"created\").count().next()", bindings));
-        }
+        engine = new GremlinGroovyScriptEngine(sandboxed);
+        bindings = engine.createBindings();
+        bindings.put("g", g);
+        bindings.put("marko", convertToVertexId(graph, "marko"));
+        assertEquals(g.V(convertToVertexId(graph, "marko")).next(), 
engine.eval("g.V(marko).next()", bindings));
+        assertEquals(g.V(convertToVertexId(graph, 
"marko")).out("created").count().next(), 
engine.eval("g.V(marko).out(\"created\").count().next()", bindings));
     }
 
     @Test
     public void shouldEvalGraph() throws Exception {
         final Graph graph = TinkerFactory.createModern();
         final GraphTraversalSource g = graph.traversal();
-        try (GremlinGroovyScriptEngine engine = new 
GremlinGroovyScriptEngine()) {
-            final Bindings bindings = engine.createBindings();
-            bindings.put("graph", graph);
-            bindings.put("marko", convertToVertexId(graph, "marko"));
-            assertEquals(graph.vertices(convertToVertexId(graph, 
"marko")).next(), engine.eval("graph.vertices(marko).next()", bindings));
-        }
-
-        try (GremlinGroovyScriptEngine engine = new 
GremlinGroovyScriptEngine(notSandboxed)) {
-            final Bindings bindings = engine.createBindings();
+        GremlinGroovyScriptEngine engine = new GremlinGroovyScriptEngine();
+        Bindings bindings = engine.createBindings();
+        bindings.put("graph", graph);
+        bindings.put("marko", convertToVertexId(graph, "marko"));
+        assertEquals(graph.vertices(convertToVertexId(graph, "marko")).next(), 
engine.eval("graph.vertices(marko).next()", bindings));
+
+        engine = new GremlinGroovyScriptEngine(notSandboxed);
+        try {
+            bindings = engine.createBindings();
             bindings.put("graph", graph);
             bindings.put("marko", convertToVertexId(graph, "marko"));
             assertEquals(graph.vertices(convertToVertexId(graph, 
"marko")).next(), engine.eval("graph.vertices(marko).next()", bindings));
@@ -110,8 +109,9 @@ public class GremlinGroovyScriptEngineSandboxedStandardTest 
{
             assertThat(ex.getMessage(), containsString("The variable [graph] 
is undeclared."));
         }
 
-        try (GremlinGroovyScriptEngine engine = new 
GremlinGroovyScriptEngine(notSandboxed)) {
-            final Bindings bindings = engine.createBindings();
+        engine = new GremlinGroovyScriptEngine(notSandboxed);
+        try {
+            bindings = engine.createBindings();
             bindings.put("graph", graph);
             bindings.put("x", convertToVertexId(graph, "marko"));
             assertEquals(graph.vertices(convertToVertexId(graph, 
"marko")).next(), engine.eval("graph.vertices(x).next()", bindings));
@@ -121,19 +121,17 @@ public class 
GremlinGroovyScriptEngineSandboxedStandardTest {
             assertThat(ex.getMessage(), containsString("The variable [graph] 
is undeclared."));
         }
 
-        try (GremlinGroovyScriptEngine engine = new 
GremlinGroovyScriptEngine(sandboxed)) {
-            final Bindings bindings = engine.createBindings();
-            bindings.put("graph", graph);
-            bindings.put("marko", convertToVertexId(graph, "marko"));
-            assertEquals(graph.vertices(convertToVertexId(graph, 
"marko")).next(), engine.eval("graph.vertices(marko).next()", bindings));
-        }
-
-        try (GremlinGroovyScriptEngine engine = new 
GremlinGroovyScriptEngine(sandboxed)) {
-            final Bindings bindings = engine.createBindings();
-            bindings.put("graph", graph);
-            bindings.put("x", convertToVertexId(graph, "marko"));
-            assertEquals(graph.vertices(convertToVertexId(graph, 
"marko")).next(), engine.eval("graph.vertices(x).next()", bindings));
-        }
+        engine = new GremlinGroovyScriptEngine(sandboxed);
+        bindings = engine.createBindings();
+        bindings.put("graph", graph);
+        bindings.put("marko", convertToVertexId(graph, "marko"));
+        assertEquals(graph.vertices(convertToVertexId(graph, "marko")).next(), 
engine.eval("graph.vertices(marko).next()", bindings));
+
+        engine = new GremlinGroovyScriptEngine(sandboxed);
+        bindings = engine.createBindings();
+        bindings.put("graph", graph);
+        bindings.put("x", convertToVertexId(graph, "marko"));
+        assertEquals(graph.vertices(convertToVertexId(graph, "marko")).next(), 
engine.eval("graph.vertices(x).next()", bindings));
     }
 
     private Object convertToVertexId(final Graph graph, final String 
vertexName) {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b75cfb8e/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTinkerPopSandboxTest.java
----------------------------------------------------------------------
diff --git 
a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTinkerPopSandboxTest.java
 
b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTinkerPopSandboxTest.java
index c2d555f..fd36eaa 100644
--- 
a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTinkerPopSandboxTest.java
+++ 
b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTinkerPopSandboxTest.java
@@ -40,7 +40,8 @@ public class GremlinGroovyScriptEngineTinkerPopSandboxTest {
     @Test
     public void shouldNotEvalAsTheMethodIsNotWhiteListed() throws Exception {
         final CompileStaticGroovyCustomizer standardSandbox = new 
CompileStaticGroovyCustomizer(TinkerPopSandboxExtension.class.getName());
-        try (GremlinGroovyScriptEngine engine = new 
GremlinGroovyScriptEngine(standardSandbox)) {
+        final GremlinGroovyScriptEngine engine = new 
GremlinGroovyScriptEngine(standardSandbox);
+        try {
             engine.eval("java.lang.Math.abs(123)");
             fail("Should have a compile error because class/method is not 
white listed");
         } catch (Exception ex) {
@@ -54,13 +55,13 @@ public class GremlinGroovyScriptEngineTinkerPopSandboxTest {
         final Graph graph = TinkerFactory.createModern();
         final GraphTraversalSource g = graph.traversal();
         final CompileStaticGroovyCustomizer standardSandbox = new 
CompileStaticGroovyCustomizer(TinkerPopSandboxExtension.class.getName());
-        try (GremlinGroovyScriptEngine engine = new 
GremlinGroovyScriptEngine(standardSandbox)) {
-            final Bindings bindings = engine.createBindings();
-            bindings.put("g", g);
-            bindings.put("marko", convertToVertexId(graph, "marko"));
-            assertEquals(g.V(convertToVertexId(graph, "marko")).next(), 
engine.eval("g.V(marko).next()", bindings));
-            assertEquals(g.V(convertToVertexId(graph, 
"marko")).out("created").count().next(), 
engine.eval("g.V(marko).out(\"created\").count().next()", bindings));
-        }
+        final GremlinGroovyScriptEngine engine = new 
GremlinGroovyScriptEngine(standardSandbox);
+
+        final Bindings bindings = engine.createBindings();
+        bindings.put("g", g);
+        bindings.put("marko", convertToVertexId(graph, "marko"));
+        assertEquals(g.V(convertToVertexId(graph, "marko")).next(), 
engine.eval("g.V(marko).next()", bindings));
+        assertEquals(g.V(convertToVertexId(graph, 
"marko")).out("created").count().next(), 
engine.eval("g.V(marko).out(\"created\").count().next()", bindings));
     }
 
     private Object convertToVertexId(final Graph graph, final String 
vertexName) {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b75cfb8e/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTypeCheckedTest.java
----------------------------------------------------------------------
diff --git 
a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTypeCheckedTest.java
 
b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTypeCheckedTest.java
index 70c7b68..6cfb7f4 100644
--- 
a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTypeCheckedTest.java
+++ 
b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTypeCheckedTest.java
@@ -37,12 +37,12 @@ public class GremlinGroovyScriptEngineTypeCheckedTest {
     @Test
     public void shouldTypeCheck() throws Exception {
         // with no type checking this should pass
-        try (GremlinGroovyScriptEngine scriptEngine = new 
GremlinGroovyScriptEngine()) {
-            assertEquals(255, scriptEngine.eval("((Object) new 
java.awt.Color(255, 255, 255)).getRed()"));
-        }
+        GremlinGroovyScriptEngine scriptEngine = new 
GremlinGroovyScriptEngine();
+        assertEquals(255, scriptEngine.eval("((Object) new java.awt.Color(255, 
255, 255)).getRed()"));
 
         final TypeCheckedGroovyCustomizer provider = new 
TypeCheckedGroovyCustomizer();
-        try (GremlinGroovyScriptEngine scriptEngine = new 
GremlinGroovyScriptEngine(provider)) {
+        scriptEngine = new GremlinGroovyScriptEngine(provider);
+        try {
             scriptEngine.eval("((Object) new java.awt.Color(255, 255, 
255)).getRed()");
             fail("Should have failed type checking");
         } catch (ScriptException se) {
@@ -56,13 +56,13 @@ public class GremlinGroovyScriptEngineTypeCheckedTest {
     public void shouldTypeCheckWithExtension() throws Exception {
         // with no type checking extension this should pass
         final TypeCheckedGroovyCustomizer providerNoExtension = new 
TypeCheckedGroovyCustomizer();
-        try (GremlinGroovyScriptEngine scriptEngine = new 
GremlinGroovyScriptEngine(providerNoExtension)) {
-            assertEquals(255, scriptEngine.eval("def c = new 
java.awt.Color(255, 255, 255); c.red"));
-        }
+        GremlinGroovyScriptEngine scriptEngine = new 
GremlinGroovyScriptEngine(providerNoExtension);
+        assertEquals(255, scriptEngine.eval("def c = new java.awt.Color(255, 
255, 255); c.red"));
 
         final TypeCheckedGroovyCustomizer providerWithExtension = new 
TypeCheckedGroovyCustomizer(
                 
PrecompiledExtensions.PreventColorUsageExtension.class.getName());
-        try (GremlinGroovyScriptEngine scriptEngine = new 
GremlinGroovyScriptEngine(providerWithExtension)) {
+        scriptEngine = new GremlinGroovyScriptEngine(providerWithExtension);
+        try {
             scriptEngine.eval("def c = new java.awt.Color(255, 255, 255); 
c.red");
             fail("Should have failed type checking");
         } catch (ScriptException se) {
@@ -75,15 +75,15 @@ public class GremlinGroovyScriptEngineTypeCheckedTest {
     public void shouldTypeCheckWithMultipleExtension() throws Exception {
         // with no type checking extension this should pass
         final TypeCheckedGroovyCustomizer providerNoExtension = new 
TypeCheckedGroovyCustomizer();
-        try (GremlinGroovyScriptEngine scriptEngine = new 
GremlinGroovyScriptEngine(providerNoExtension)) {
-            assertEquals(255, scriptEngine.eval("def c = new 
java.awt.Color(255, 255, 255); c.red"));
-            assertEquals(1l, scriptEngine.eval("def c = new 
java.util.concurrent.CountDownLatch(1); c.count"));
-        }
+        GremlinGroovyScriptEngine scriptEngine = new 
GremlinGroovyScriptEngine(providerNoExtension);
+        assertEquals(255, scriptEngine.eval("def c = new java.awt.Color(255, 
255, 255); c.red"));
+        assertEquals(1l, scriptEngine.eval("def c = new 
java.util.concurrent.CountDownLatch(1); c.count"));
 
         final TypeCheckedGroovyCustomizer providerWithExtension = new 
TypeCheckedGroovyCustomizer(
                 
PrecompiledExtensions.PreventColorUsageExtension.class.getName() +
                         "," + 
PrecompiledExtensions.PreventCountDownLatchUsageExtension.class.getName());
-        try (GremlinGroovyScriptEngine scriptEngine = new 
GremlinGroovyScriptEngine(providerWithExtension)) {
+        scriptEngine = new GremlinGroovyScriptEngine(providerWithExtension);
+        try {
             scriptEngine.eval("def c = new java.awt.Color(255, 255, 255); 
c.red");
             fail("Should have failed type checking");
         } catch (ScriptException se) {
@@ -91,7 +91,8 @@ public class GremlinGroovyScriptEngineTypeCheckedTest {
             assertThat(se.getMessage(), containsString("Method call is not 
allowed!"));
         }
 
-        try (GremlinGroovyScriptEngine scriptEngine = new 
GremlinGroovyScriptEngine(providerWithExtension)) {
+        scriptEngine = new GremlinGroovyScriptEngine(providerWithExtension);
+        try {
             scriptEngine.eval("def c = new 
java.util.concurrent.CountDownLatch(1); c.count");
             fail("Should have failed type checking");
         } catch (ScriptException se) {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b75cfb8e/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/graph-traversal.js
----------------------------------------------------------------------
diff --git 
a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/graph-traversal.js
 
b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/graph-traversal.js
index 901f9b0..edeb2cb 100644
--- 
a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/graph-traversal.js
+++ 
b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/graph-traversal.js
@@ -1132,16 +1132,6 @@ class GraphTraversal extends Traversal {
     return this;
   }
   
-  /**
-   * Graph traversal with method.
-   * @param {...Object} args
-   * @returns {GraphTraversal}
-   */
-  with(...args) {
-    this.bytecode.addStep('with', args);
-    return this;
-  }
-  
 }
 
 function callOnEmptyTraversal(fnName, args) {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b75cfb8e/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
----------------------------------------------------------------------
diff --git 
a/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py 
b/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
index a492f9c..d5630c0 100644
--- a/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
+++ b/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
@@ -505,10 +505,6 @@ class GraphTraversal(Traversal):
         self.bytecode.add_step("where", *args)
         return self
 
-    def with(self, *args):
-        self.bytecode.add_step("with", *args)
-        return self
-
 
 class __(object):
     graph_traversal = GraphTraversal

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b75cfb8e/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/HadoopConfiguration.java
----------------------------------------------------------------------
diff --git 
a/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/HadoopConfiguration.java
 
b/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/HadoopConfiguration.java
index 9e31225..a8125ea 100644
--- 
a/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/HadoopConfiguration.java
+++ 
b/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/HadoopConfiguration.java
@@ -98,30 +98,6 @@ public final class HadoopConfiguration extends 
AbstractConfiguration implements
         }
     }
 
-    /**
-     * @deprecated As of release 3.2.0, replaced by {@link 
HadoopConfiguration#getGraphReader()}.
-     */
-    @Deprecated
-    public Class<InputFormat<NullWritable, VertexWritable>> 
getGraphInputFormat() {
-        try {
-            return (Class) 
Class.forName(this.getString(Constants.GREMLIN_HADOOP_GRAPH_READER));
-        } catch (final ClassNotFoundException e) {
-            throw new RuntimeException(e.getMessage(), e);
-        }
-    }
-
-    /**
-     * @deprecated As of release 3.2.0, replaced by {@link 
HadoopConfiguration#getGraphWriter()}.
-     */
-    @Deprecated
-    public Class<OutputFormat<NullWritable, VertexWritable>> 
getGraphOutputFormat() {
-        try {
-            return (Class) 
Class.forName(this.getString(Constants.GREMLIN_HADOOP_GRAPH_WRITER));
-        } catch (final ClassNotFoundException e) {
-            throw new RuntimeException(e.getMessage(), e);
-        }
-    }
-
     public String getInputLocation() {
         return this.getString(Constants.GREMLIN_HADOOP_INPUT_LOCATION);
     }

Reply via email to