subclasses and implementations of method parameter arguments cause NameError
----------------------------------------------------------------------------

                 Key: JRUBY-1233
                 URL: http://jira.codehaus.org/browse/JRUBY-1233
             Project: JRuby
          Issue Type: Bug
          Components: Java Integration
    Affects Versions: JRuby 1.0.0
         Environment: tested with jruby 1.0 and jruby trunk revision 4052, 
on Mac OS X 10.4.10
            Reporter: Benjamin Heitmann
         Attachments: parameter_inheritance.zip

If a class myClass has a method myMethod, which takes class A as parameter, and 
is called with class B, which is a subclass or an implementation of Class A 
(depends if A is a class or a in interface), then a NameError is thrown: 

 no add with arguments matching [class org.openrdf.sail.memory.model.MemURI, 
class org.openrdf.sail.memory.model.MemURI, class 
org.openrdf.sail.memory.model.MemURI] on object 
#<Java::OrgOpenrdfRepositorySail::SailRepositoryConnection:0xc24c1e @[EMAIL 
PROTECTED]> (NameError)


This did not happen in jruby trunk revision 2886, but it happens in jruby 1.0 
and jruby trunk rev 4052

The attachment contains the 4 jars and a ruby script which can be used to 
replicate the problem. 
Just unpack and run the ruby script.

It might be possible that the error is related to the class tree of the method 
parameter in question. 
The class tree (up to the relevant class) has a depth of 5, and more then once 
two interfaces are implemented by a class at the same time. 

If it is strictly necessary, I can try to recreate this error just with simple 
java files. 
But as this will require recreating all 15 or so involved class files, I first 
wanted to confirm this error. 

-- 
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

Reply via email to