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 2019/10/03 16:41:39 UTC

[tinkerpop] 02/06: TINKERPOP-2076 Backport 759d1a724eef3f76b48508ba8c49dcb992eff28f from Groovy 2.5.3 upgrade

This is an automated email from the ASF dual-hosted git repository.

spmallette pushed a commit to branch TINKERPOP-2076
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 38f01e86e31c4633aed328b13b0e3eed7ab6c993
Author: Stephen Mallette <sp...@genoprime.com>
AuthorDate: Tue Mar 5 18:23:20 2019 -0500

    TINKERPOP-2076 Backport 759d1a724eef3f76b48508ba8c49dcb992eff28f from Groovy 2.5.3 upgrade
---
 .../apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java | 6 +++---
 .../apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java
index 1a3ffc3..ed7b6e1 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java
@@ -300,9 +300,9 @@ public abstract class AbstractEvalOpProcessor extends AbstractOpProcessor {
                     // presented itself where the "Method code too large!" comes with other compilation errors so
                     // it seems that this message trumps other compilation errors to some reasonable degree that ends
                     // up being favorable for this problem
-                    if (t instanceof MultipleCompilationErrorsException && t.getMessage().contains("Method code too large!") &&
+                    if (t instanceof MultipleCompilationErrorsException && t.getMessage().contains("Method too large") &&
                             ((MultipleCompilationErrorsException) t).getErrorCollector().getErrorCount() == 1) {
-                        final String errorMessage = String.format("The Gremlin statement that was submitted exceed the maximum compilation size allowed by the JVM, please split it into multiple smaller statements - %s", trimMessage(msg));
+                        final String errorMessage = String.format("The Gremlin statement that was submitted exceeds the maximum compilation size allowed by the JVM, please split it into multiple smaller statements - %s", trimMessage(msg));
                         logger.warn(errorMessage);
                         ctx.writeAndFlush(ResponseMessage.build(msg).code(ResponseStatusCode.SERVER_ERROR_SCRIPT_EVALUATION)
                                                          .statusMessage(errorMessage)
@@ -322,7 +322,7 @@ public abstract class AbstractEvalOpProcessor extends AbstractOpProcessor {
     }
 
     /**
-     * Used to decrease the size of a Gremlin script that triggered a "method code too large" exception so that it
+     * Used to decrease the size of a Gremlin script that triggered a "method too large" exception so that it
      * doesn't log a massive text string nor return a large error message.
      */
     private RequestMessage trimMessage(final RequestMessage msg) {
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
index 2887a6f..186f307 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
@@ -1499,7 +1499,7 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration
             client.submit(script, b).all().get();
             fail("Should have tanked out because of number of parameters used and size of the compile script");
         } catch (Exception ex) {
-            assertThat(ex.getMessage(), containsString("The Gremlin statement that was submitted exceed the maximum compilation size allowed by the JVM"));
+            assertThat(ex.getMessage(), containsString("The Gremlin statement that was submitted exceeds the maximum compilation size allowed by the JVM"));
         }
     }
 }