NameError thrown when trying to pass argument to a Java method that is defined
as having variable length arguments
------------------------------------------------------------------------------------------------------------------
Key: JRUBY-1924
URL: http://jira.codehaus.org/browse/JRUBY-1924
Project: JRuby
Issue Type: Bug
Components: Java Integration
Affects Versions: JRuby 1.1b1, JRuby 1.0.3
Reporter: Brian Knorr
>From your ruby code try calling a Java class with variable length arguments,
>when you do this a NameError is thrown. For example:
TextField textField(Finder... finder) throws Exception; //takes in 1 or more
Finders and chains them together
When you try to call this interface with Ruby and pass in an argument that
implements the Finder interface you get the following error:
:1: no link with arguments matching [class watij.finders.AttributeFinder] on
object JavaUtilities (NameError)
from :1:in `load'
from :1
If I change the interface to not be "variable length" as below, everything
works fine:
TextField textField(Finder finder) throws Exception;
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email