You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "stephen mallette (JIRA)" <ji...@apache.org> on 2015/04/07 15:40:12 UTC

[jira] [Updated] (TINKERPOP3-600) GremlinGroovyScriptEngine.invokeFunction and invokeMethod should be varargs

     [ https://issues.apache.org/jira/browse/TINKERPOP3-600?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stephen mallette updated TINKERPOP3-600:
----------------------------------------
    Fix Version/s: 3.0.0.GA

> 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
>            Reporter: Jim Lloyd
>            Assignee: stephen mallette
>            Priority: Critical
>             Fix For: 3.0.0.GA
>
>
> 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)