nil implicitly casts to java.lang.Integer instead of java.lang.Long during 
method dispatch
------------------------------------------------------------------------------------------

                 Key: JRUBY-4038
                 URL: http://jira.codehaus.org/browse/JRUBY-4038
             Project: JRuby
          Issue Type: Bug
          Components: Interpreter
    Affects Versions: JRuby 1.4.0RC1
         Environment: Ubuntu linux
            Reporter: Greg Fodor
         Attachments: bug1.tar.gz

If you have a Java method which receives a parameter of java.lang.Long, in 
JRuby 1.4.0RC1 it will cast Fixnums to Integers and also cast nil's to Integers 
as well when calling that method from JRuby. The attached example creates a 
class with a simple constructor receiving a Long, and the rb file tries to call 
the constructor passing nil. It is impossible to call this constructor with nil 
because JRuby will always try to pass an Integer.

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