Jim Lloyd created TINKERPOP3-600:
------------------------------------
Summary: GremlinGroovyScriptEngine.invokeFunction and invokeMethod
should be varargs
Key: TINKERPOP3-600
URL: https://issues.apache.org/jira/browse/TINKERPOP3-600
Project: TinkerPop 3
Issue Type: Bug
Components: groovy
Affects Versions: 3.0.0.GA
Reporter: Jim Lloyd
Priority: Minor
This class implements methods declared in the interface
org.codehaus.groovy.jsr223.GroovyScriptEngineImpl. In the interface,
invokeFunction and invokeMethod declare the final parameter as a varargs
parameter, e.g.:
{code}
public java.lang.Object
org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.invokeFunction(java.lang.String,java.lang.Object...)
throws javax.script.ScriptException,java.lang.NoSuchMethodException
{code}
But GroovyScriptEngineImpl does not use varargs for the final parameter, e.g.:
{code}
public java.lang.Object
com.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.invokeFunction(java.lang.String,java.lang.Object[])
throws javax.script.ScriptException,java.lang.NoSuchMethodException
{code}
While this problem may go unnoticed by the vast majority of Tinkerpop users, it
is a significant problem for my use case. I have developed a tool to generate
Typescript interface declarations for Java classes using Java Reflection,
allowing my project to use Tinkerpop within a node.js application. The tool
generates bad interfaces due to this bug, which causes all Typescript code
using those interfaces to fail with a Typescript compiler error. While I may be
able to work around the problem in my tool, it seems to me that fixing this in
Tinkerpop should be trivial (in addition to being the right thing to do).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)