[
https://issues.apache.org/jira/browse/TINKERPOP3-600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14488130#comment-14488130
]
ASF GitHub Bot commented on TINKERPOP3-600:
-------------------------------------------
GitHub user jimlloyd opened a pull request:
https://github.com/apache/incubator-tinkerpop/pull/50
Fixes TINKERPOP3-600: invoke{Function|Method} should be varargs
Fixes
[TINKERPOP3-600](https://issues.apache.org/jira/browse/TINKERPOP3-600).
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/RedSeal-co/incubator-tinkerpop TINKERPOP3-600
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-tinkerpop/pull/50.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #50
----
commit 908f3821258c769147e626aa7fe65ed296152639
Author: Jim Lloyd <[email protected]>
Date: 2015-04-09T19:45:06Z
Fixes TINKERPOP3-600: invoke{Function|Method} should be varargs
----
> 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)