From 40dad27880189ffb8c901a8d7bdcf3d505325693 Mon Sep 17 00:00:00 2001 From: Stephen Mallette Date: Mon, 23 Apr 2018 09:33:25 -0400 Subject: [PATCH] TINKERPOP-1953 Bump to Groovy 2.4.15 Fixes a bug in Lambda construction for remote traversals --- CHANGELOG.asciidoc | 1 + .../upgrade/release-3.2.x-incubating.asciidoc | 24 +++++++++++++++++++ .../jsr223/GremlinGroovyScriptEngineTest.java | 9 +++++++ pom.xml | 2 +- 4 files changed, 35 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 51c9f68adeb..797072d2bf3 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -24,6 +24,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima === TinkerPop 3.2.9 (Release Date: NOT OFFICIALLY RELEASED YET) * Bumped to httpclient 4.5.5. +* Bumped to Groovy 2.4.15 - fixes bug with `Lambda` construction. * Improved performance of GraphSON deserialization of `Bytecode`. [[release-3-2-8]] diff --git a/docs/src/upgrade/release-3.2.x-incubating.asciidoc b/docs/src/upgrade/release-3.2.x-incubating.asciidoc index b57a6576e6b..51b85d352ad 100644 --- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc +++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc @@ -21,6 +21,30 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima *Nine Inch Gremlins* +== TinkerPop 3.2.9 + +*Release Date: NOT OFFICIALLY RELEASED YET* + +Please see the link:https://github.com/apache/tinkerpop/blob/3.2.8/CHANGELOG.asciidoc#release-3-2-9[changelog] for a complete list of all the modifications that are part of this release. + +=== Upgrading for Users + +==== Lambda Construction + +It was realized quite shortly after release of 3.2.8 that there was a bug in construction of `Lambda` instances: + +[source,text] +---- +gremlin> org.apache.tinkerpop.gremlin.util.function.Lambda.function("{ it.get() }") +(class: org/apache/tinkerpop/gremlin/util/function/Lambda$function, method: callStatic signature: (Ljava/lang/Class;[Ljava/lang/Object;)Ljava/lang/Object;) Illegal type in constant pool +Type ':help' or ':h' for help. +Display stack trace? [yN]n +---- + +The problem was related to a bug in Groovy 2.4.14 and was fixed in 2.4.15. + +See: link:https://issues.apache.org/jira/browse/TINKERPOP-1953[TINKERPOP-1953] + == TinkerPop 3.2.8 *Release Date: April 2, 2018* diff --git a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTest.java b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTest.java index 0606721158f..54e997fa8b5 100644 --- a/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTest.java +++ b/gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTest.java @@ -26,6 +26,7 @@ import org.apache.tinkerpop.gremlin.groovy.NoImportCustomizerProvider; import org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.InterpreterModeCustomizerProvider; import org.apache.tinkerpop.gremlin.structure.Vertex; +import org.apache.tinkerpop.gremlin.util.function.Lambda; import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils; import org.javatuples.Pair; import org.junit.Test; @@ -603,4 +604,12 @@ public void shouldGetClassMapCacheBasicStats() throws Exception { assertEquals(1, engine.getClassCacheLoadFailureCount()); assertEquals(100, engine.getClassCacheLoadSuccessCount()); } + + @Test + public void shouldEvalForLambda() throws Exception { + // https://issues.apache.org/jira/browse/TINKERPOP-1953 + final GremlinGroovyScriptEngine engine = new GremlinGroovyScriptEngine(); + final Lambda l = (Lambda) engine.eval(" org.apache.tinkerpop.gremlin.util.function.Lambda.function(\"{ it.get() }\")"); + assertEquals("{ it.get() }", l.getLambdaScript()); + } } \ No newline at end of file diff --git a/pom.xml b/pom.xml index 5ac2d889ed6..4ec1ab4c89e 100644 --- a/pom.xml +++ b/pom.xml @@ -141,7 +141,7 @@ limitations under the License. 1.10 2.6 3.3.1 - 2.4.14 + 2.4.15 2.7.2 1.2 2.10.4