Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A6DE2200C3B for ; Fri, 3 Mar 2017 21:08:17 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id A5938160B6D; Fri, 3 Mar 2017 20:08:17 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4A2C6160B85 for ; Fri, 3 Mar 2017 21:08:15 +0100 (CET) Received: (qmail 53789 invoked by uid 500); 3 Mar 2017 20:08:14 -0000 Mailing-List: contact commits-help@tinkerpop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tinkerpop.apache.org Delivered-To: mailing list commits@tinkerpop.apache.org Received: (qmail 53704 invoked by uid 99); 3 Mar 2017 20:08:14 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Mar 2017 20:08:14 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 523D0DFFDA; Fri, 3 Mar 2017 20:08:14 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: spmallette@apache.org To: commits@tinkerpop.apache.org Date: Fri, 03 Mar 2017 20:08:20 -0000 Message-Id: <180cd555c8b447ebbb25e5695adccc4c@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [07/46] tinkerpop git commit: TINKERPOP-1612 Removed mode for old plugin system in console archived-at: Fri, 03 Mar 2017 20:08:17 -0000 TINKERPOP-1612 Removed mode for old plugin system in console In 3.2.4 the new plugin system was introduced. It was designed to run parallel to the old so there was some extra code in the console to allow it to load either the old plugin system or the new. Since TinkerGraph has removed its plugin due to removal of gremlin-groovy as a dependency, the old plugin system had to be removed as well for 3.3.0 or else no tinkergraph stuff will load in the console. Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/21c530af Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/21c530af Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/21c530af Branch: refs/heads/master Commit: 21c530afbacc43b27c9903770149c94ea5d0790d Parents: 09510a1 Author: Stephen Mallette Authored: Mon Jan 30 14:36:56 2017 -0500 Committer: Stephen Mallette Committed: Wed Mar 1 16:06:15 2017 -0500 ---------------------------------------------------------------------- .../giraph/jsr223/GiraphGremlinPlugin.java | 2 +- gremlin-console/src/main/ext/plugins.txt | 6 +- .../tinkerpop/gremlin/console/Console.groovy | 29 ++------ .../tinkerpop/gremlin/console/Mediator.groovy | 1 - .../console/commands/InstallCommand.groovy | 14 +--- .../gremlin/jsr223/CoreGremlinModule.java | 62 ---------------- .../tinkerpop/gremlin/jsr223/CoreImports.java | 1 + .../DefaultGremlinScriptEngineManager.java | 25 ------- .../tinkerpop/gremlin/jsr223/GremlinModule.java | 74 -------------------- .../jsr223/GremlinScriptEngineManager.java | 8 --- .../jsr223/GremlinEnabledScriptEngineTest.java | 25 ------- 11 files changed, 15 insertions(+), 232 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/21c530af/giraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/giraph/jsr223/GiraphGremlinPlugin.java ---------------------------------------------------------------------- diff --git a/giraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/giraph/jsr223/GiraphGremlinPlugin.java b/giraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/giraph/jsr223/GiraphGremlinPlugin.java index ee49ed5..c512335 100644 --- a/giraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/giraph/jsr223/GiraphGremlinPlugin.java +++ b/giraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/giraph/jsr223/GiraphGremlinPlugin.java @@ -38,7 +38,7 @@ public final class GiraphGremlinPlugin extends AbstractGremlinPlugin { private static final String MODULE_NAME = "tinkerpop.giraph"; private static final GiraphGremlinPlugin instance = new GiraphGremlinPlugin(); - private GiraphGremlinPlugin() { + public GiraphGremlinPlugin() { super(MODULE_NAME, DefaultImportCustomizer.build().addClassImports( EmptyOutEdges.class, GiraphComputation.class, http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/21c530af/gremlin-console/src/main/ext/plugins.txt ---------------------------------------------------------------------- diff --git a/gremlin-console/src/main/ext/plugins.txt b/gremlin-console/src/main/ext/plugins.txt index 2b1a2e7..7eb2b23 100644 --- a/gremlin-console/src/main/ext/plugins.txt +++ b/gremlin-console/src/main/ext/plugins.txt @@ -1,3 +1,3 @@ -org.apache.tinkerpop.gremlin.console.groovy.plugin.DriverGremlinPlugin -org.apache.tinkerpop.gremlin.console.groovy.plugin.UtilitiesGremlinPlugin -org.apache.tinkerpop.gremlin.tinkergraph.groovy.plugin.TinkerGraphGremlinPlugin \ No newline at end of file +org.apache.tinkerpop.gremlin.console.jsr223.DriverGremlinPlugin +org.apache.tinkerpop.gremlin.console.jsr223.UtilitiesGremlinPlugin +org.apache.tinkerpop.gremlin.tinkergraph.jsr223.TinkerGraphGremlinPlugin \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/21c530af/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy ---------------------------------------------------------------------- diff --git a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy index 8eee338..57eca8b 100644 --- a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy +++ b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy @@ -29,8 +29,8 @@ import org.apache.tinkerpop.gremlin.console.commands.RemoteCommand import org.apache.tinkerpop.gremlin.console.commands.SubmitCommand import org.apache.tinkerpop.gremlin.console.commands.UninstallCommand import org.apache.tinkerpop.gremlin.groovy.loaders.GremlinLoader -import org.apache.tinkerpop.gremlin.groovy.plugin.GremlinPlugin import org.apache.tinkerpop.gremlin.jsr223.CoreGremlinPlugin +import org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin import org.apache.tinkerpop.gremlin.jsr223.ImportCustomizer import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalExplanation import org.apache.tinkerpop.gremlin.structure.Edge @@ -94,18 +94,10 @@ class Console { // hide output temporarily while imports execute showShellEvaluationOutput(false) - if (Mediator.useV3d3) { - def imports = (ImportCustomizer) CoreGremlinPlugin.instance().getCustomizers("gremlin-groovy").get()[0] - imports.getClassPackages().collect { Mediator.IMPORT_SPACE + it.getName() + Mediator.IMPORT_WILDCARD }.each { groovy.execute(it) } - imports.getMethodClasses().collect { Mediator.IMPORT_STATIC_SPACE + it.getCanonicalName() + Mediator.IMPORT_WILDCARD}.each{ groovy.execute(it) } - imports.getEnumClasses().collect { Mediator.IMPORT_STATIC_SPACE + it.getCanonicalName() + Mediator.IMPORT_WILDCARD}.each{ groovy.execute(it) } - } else { - // add the default imports - new ConsoleImportCustomizerProvider().getCombinedImports().stream() - .collect { Mediator.IMPORT_SPACE + it }.each { groovy.execute(it) } - new ConsoleImportCustomizerProvider().getCombinedStaticImports().stream() - .collect { Mediator.IMPORT_STATIC_SPACE + it }.each { groovy.execute(it) } - } + def imports = (ImportCustomizer) CoreGremlinPlugin.instance().getCustomizers("gremlin-groovy").get()[0] + imports.getClassPackages().collect { Mediator.IMPORT_SPACE + it.getName() + Mediator.IMPORT_WILDCARD }.each { groovy.execute(it) } + imports.getMethodClasses().collect { Mediator.IMPORT_STATIC_SPACE + it.getCanonicalName() + Mediator.IMPORT_WILDCARD}.each{ groovy.execute(it) } + imports.getEnumClasses().collect { Mediator.IMPORT_STATIC_SPACE + it.getCanonicalName() + Mediator.IMPORT_WILDCARD}.each{ groovy.execute(it) } final InteractiveShellRunner runner = new InteractiveShellRunner(groovy, handlePrompt) runner.setErrorHandler(handleError) @@ -121,16 +113,9 @@ class Console { // check for available plugins. if they are in the "active" plugins strategies then "activate" them def activePlugins = Mediator.readPluginState() - def pluginClass = mediator.useV3d3 ? org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin : GremlinPlugin - ServiceLoader.load(pluginClass, groovy.getInterp().getClassLoader()).each { plugin -> + ServiceLoader.load(GremlinPlugin, groovy.getInterp().getClassLoader()).each { plugin -> if (!mediator.availablePlugins.containsKey(plugin.class.name)) { - def pluggedIn - - if (Mediator.useV3d3) { - pluggedIn = new PluggedIn(new PluggedIn.GremlinPluginAdapter((org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin) plugin, groovy, io), groovy, io, false) - } else { - pluggedIn = new PluggedIn((GremlinPlugin) plugin, groovy, io, false) - } + def pluggedIn = new PluggedIn(new PluggedIn.GremlinPluginAdapter((GremlinPlugin) plugin, groovy, io), groovy, io, false) mediator.availablePlugins.put(plugin.class.name, pluggedIn) http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/21c530af/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Mediator.groovy ---------------------------------------------------------------------- diff --git a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Mediator.groovy b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Mediator.groovy index 2f5b827..3d01340 100644 --- a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Mediator.groovy +++ b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Mediator.groovy @@ -36,7 +36,6 @@ class Mediator { public static final String IMPORT_SPACE = "import " public static final String IMPORT_STATIC_SPACE = "import static " public static final String IMPORT_WILDCARD = ".*" - public static final boolean useV3d3 = System.getProperty("plugins", "v3d2") == "v3d3" public Mediator(final Console console) { this.console = console http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/21c530af/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/commands/InstallCommand.groovy ---------------------------------------------------------------------- diff --git a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/commands/InstallCommand.groovy b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/commands/InstallCommand.groovy index 5386e89..1188027 100644 --- a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/commands/InstallCommand.groovy +++ b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/commands/InstallCommand.groovy @@ -21,10 +21,10 @@ package org.apache.tinkerpop.gremlin.console.commands import org.apache.tinkerpop.gremlin.console.ConsoleFs import org.apache.tinkerpop.gremlin.console.Mediator import org.apache.tinkerpop.gremlin.console.PluggedIn -import org.apache.tinkerpop.gremlin.groovy.plugin.GremlinPlugin import groovy.grape.Grape import org.apache.tinkerpop.gremlin.groovy.util.Artifact import org.apache.tinkerpop.gremlin.groovy.util.DependencyGrabber +import org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin import org.codehaus.groovy.tools.shell.CommandSupport import org.codehaus.groovy.tools.shell.Groovysh @@ -64,17 +64,9 @@ class InstallCommand extends CommandSupport { // note that the service loader utilized the classloader from the groovy shell as shell class are available // from within there given loading through Grape. - def pluginClass = mediator.useV3d3 ? org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin : GremlinPlugin - ServiceLoader.load(pluginClass, shell.getInterp().getClassLoader()).forEach { plugin -> + ServiceLoader.load(GremlinPlugin, shell.getInterp().getClassLoader()).forEach { plugin -> if (!mediator.availablePlugins.containsKey(plugin.class.name)) { - - if (Mediator.useV3d3) { - mediator.availablePlugins.put(plugin.class.name, new PluggedIn(new PluggedIn.GremlinPluginAdapter((org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin) plugin, shell, io), shell, io, false)) - } else { - mediator.availablePlugins.put(plugin.class.name, new PluggedIn((GremlinPlugin) plugin, shell, io, false)) - } - - //mediator.availablePlugins.put(plugin.class.name, new PluggedIn(plugin, shell, io, false)) + mediator.availablePlugins.put(plugin.class.name, new PluggedIn(new PluggedIn.GremlinPluginAdapter((GremlinPlugin) plugin, shell, io), shell, io, false)) if (plugin.requireRestart()) pluginsThatNeedRestart << plugin.name } http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/21c530af/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/CoreGremlinModule.java ---------------------------------------------------------------------- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/CoreGremlinModule.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/CoreGremlinModule.java deleted file mode 100644 index 369e171..0000000 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/CoreGremlinModule.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tinkerpop.gremlin.jsr223; - -import java.util.Optional; - -/** - * This module is required for a {@code ScriptEngine} to be Gremlin-enabled. - * - * @author Stephen Mallette (http://stephen.genoprime.com) - * @deprecated As of release 3.2.4, replaced by {@link CoreGremlinPlugin}. - */ -@Deprecated -public final class CoreGremlinModule implements GremlinModule { - - private static final String MODULE_NAME = "tinkerpop.core"; - - private static final ImportCustomizer gremlinCore = DefaultImportCustomizer.build() - .addClassImports(CoreImports.getClassImports()) - .addEnumImports(CoreImports.getEnumImports()) - .addMethodImports(CoreImports.getMethodImports()).create(); - - private static final Customizer[] customizers = new Customizer[] {gremlinCore}; - - /** - * @deprecated As of 3.2.4, replaced by {@link #instance()} as this field will later become private. - */ - @Deprecated - public static final CoreGremlinModule INSTANCE = new CoreGremlinModule(); - - private CoreGremlinModule() {} - - public static CoreGremlinModule instance() { - return INSTANCE; - } - - @Override - public Optional getCustomizers(final String scriptEngineName) { - return Optional.of(customizers); - } - - @Override - public String getName() { - return MODULE_NAME; - } -} http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/21c530af/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/CoreImports.java ---------------------------------------------------------------------- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/CoreImports.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/CoreImports.java index fef2e0f..5701e47 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/CoreImports.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/CoreImports.java @@ -135,6 +135,7 @@ import java.util.stream.Stream; /** * @author Marko A. Rodriguez (http://markorodriguez.com) + * @author Stephen Mallette (http://stephen.genoprime.com) */ public final class CoreImports { http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/21c530af/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/DefaultGremlinScriptEngineManager.java ---------------------------------------------------------------------- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/DefaultGremlinScriptEngineManager.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/DefaultGremlinScriptEngineManager.java index b3025ec..ddde15e 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/DefaultGremlinScriptEngineManager.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/DefaultGremlinScriptEngineManager.java @@ -100,14 +100,6 @@ public class DefaultGremlinScriptEngineManager implements GremlinScriptEngineMan private List plugins = new ArrayList<>(); /** - * List of extensions for the {@link GremlinScriptEngineManager} which will be used to supply - * {@link Customizer} instances to {@link GremlinScriptEngineFactory} that are instantiated. - * - * @deprecated As of release 3.2.4, replaced by {@link #plugins}. - */ - private List modules = new ArrayList<>(); - - /** * The effect of calling this constructor is the same as calling * {@code DefaultGremlinScriptEngineManager(Thread.currentThread().getContextClassLoader())}. */ @@ -133,26 +125,9 @@ public class DefaultGremlinScriptEngineManager implements GremlinScriptEngineMan return Stream.of(customizers.orElse(new Customizer[0])); }).collect(Collectors.toList()); - // modules are deprecated in favor of GremlinPlugin - this line will eventually be removed - pluginCustomizers.addAll(modules.stream().flatMap(plugin -> { - final Optional customizers = plugin.getCustomizers(scriptEngineName); - return Stream.of(customizers.orElse(new Customizer[0])); - }).collect(Collectors.toList())); - - return pluginCustomizers; } - /** - * @deprecated As of release 3.2.4, replaced by {@link #addPlugin(GremlinPlugin)}. - */ - @Override - @Deprecated - public void addModule(final GremlinModule module) { - // TODO: should modules be a set based on "name" to ensure uniqueness? not sure what bad stuff can happen with dupes - if (module != null) modules.add(module); - } - @Override public void addPlugin(final GremlinPlugin plugin) { // TODO: should modules be a set based on "name" to ensure uniqueness? not sure what bad stuff can happen with dupes http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/21c530af/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/GremlinModule.java ---------------------------------------------------------------------- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/GremlinModule.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/GremlinModule.java deleted file mode 100644 index f05b51c..0000000 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/GremlinModule.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.tinkerpop.gremlin.jsr223; - -import org.apache.tinkerpop.gremlin.jsr223.console.RemoteAcceptor; - -import java.util.Optional; - -/** - * @author Stephen Mallette (http://stephen.genoprime.com) - * @deprecated As of release 3.2.4, replaced by {@link GremlinPlugin}. - */ -@Deprecated -public interface GremlinModule { - /** - * The name of the module. This name should be unique (use a namespaced approach) as naming clashes will - * prevent proper module operations. Modules developed by TinkerPop will be prefixed with "tinkerpop." - * For example, TinkerPop's implementation of Giraph would be named "tinkerpop.giraph". If Facebook were - * to do their own implementation the implementation might be called "facebook.giraph". - */ - public String getName(); - - /** - * Some modules may require a restart of the plugin host for the classloader to pick up the features. This is - * typically true of modules that rely on {@code Class.forName()} to dynamically instantiate classes from the - * root classloader (e.g. JDBC drivers that instantiate via @{code DriverManager}). - */ - public default boolean requireRestart() { - return false; - } - - /** - * Gets the list of all {@link Customizer} implementations to assign to a new {@link GremlinScriptEngine}. This is - * the same as doing {@code getCustomizers(null)}. - */ - public default Optional getCustomizers(){ - return getCustomizers(null); - } - - /** - * Gets the list of {@link Customizer} implementations to assign to a new {@link GremlinScriptEngine}. The - * implementation should filter the returned {@code Customizers} according to the supplied name of the - * Gremlin-enabled {@code ScriptEngine}. By providing a filter, {@code GremlinModule} developers can have the - * ability to target specific {@code ScriptEngines}. - * - * @param scriptEngineName The name of the {@code ScriptEngine} or null to get all the available {@code Customizers} - */ - public Optional getCustomizers(final String scriptEngineName); - - /** - * Allows a plugin to utilize features of the {@code :remote} and {@code :submit} commands of the Gremlin Console. - * This method does not need to be implemented if the plugin is not meant for the Console for some reason or - * if it does not intend to take advantage of those commands. - */ - public default Optional remoteAcceptor() { - return Optional.empty(); - } -} http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/21c530af/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/GremlinScriptEngineManager.java ---------------------------------------------------------------------- diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/GremlinScriptEngineManager.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/GremlinScriptEngineManager.java index a48d761..eb4a2d3 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/GremlinScriptEngineManager.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/GremlinScriptEngineManager.java @@ -118,14 +118,6 @@ public interface GremlinScriptEngineManager { public List getEngineFactories(); /** - * Add {@link GremlinModule} instances to customize newly created {@link GremlinScriptEngine} instances. - * - * @deprecated As of release 3.2.4, replaced by {@link #addPlugin(GremlinPlugin)}. - */ - @Deprecated - public void addModule(final GremlinModule module); - - /** * Add {@link GremlinPlugin} instances to customize newly created {@link GremlinScriptEngine} instances. */ public void addPlugin(final GremlinPlugin plugin); http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/21c530af/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/jsr223/GremlinEnabledScriptEngineTest.java ---------------------------------------------------------------------- diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/jsr223/GremlinEnabledScriptEngineTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/jsr223/GremlinEnabledScriptEngineTest.java index 5a880f8..e31a657 100644 --- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/jsr223/GremlinEnabledScriptEngineTest.java +++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/jsr223/GremlinEnabledScriptEngineTest.java @@ -57,31 +57,6 @@ public class GremlinEnabledScriptEngineTest { } @Test - public void shouldSupportDeprecatedGremlinModules() throws Exception { - final GremlinScriptEngineManager mgr = new DefaultGremlinScriptEngineManager(); - mgr.addModule(new GremlinModule() { - @Override - public String getName() { - return "test.junk"; - } - - @Override - public Optional getCustomizers(final String scriptEngineName) { - return Optional.of(new Customizer[] {DefaultImportCustomizer.build() - .addClassImports(java.awt.Color.class) - .addClassImports(java.sql.CallableStatement.class) - .create() }); - } - }); - - final GremlinScriptEngine scriptEngine = mgr.getEngineByName(ENGINE_TO_TEST); - final List classesToCheck = Arrays.asList(java.awt.Color.class, java.sql.CallableStatement.class); - for (Class clazz : classesToCheck) { - assertEquals(clazz, scriptEngine.eval(clazz.getSimpleName())); - } - } - - @Test public void shouldReturnNoCustomizers() { final GremlinScriptEngineManager mgr = new DefaultGremlinScriptEngineManager(); mgr.addPlugin(ImportGremlinPlugin.build()