jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • JRuby
  • JRUBY-3072

Using a ruby Numeric to set a parameter with a signature of java.lang.Integer causes a java.lang.ClassCastException

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Incomplete
  • Affects Version/s: JRuby 1.1.3, JRuby 1.1.4
  • Fix Version/s: None
  • Component/s: Java Integration
  • Labels:
    None

Description

An example of this failing can be found at http://gist.github.com/19127

Trying to set a property that is of type java.lang.Integer with a ruby Numeric throws a java.lang.ClassCastException because ruby is converting the Numeric to a java.lang.Long

The Actual message: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer (NativeException)

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Charles Oliver Nutter added a comment - 12/Feb/09 12:58 AM

I guess I don't follow. The example does not appear to be complete; type declarations are missing on the two "id" parameters, and the script is not runnable without some componentDAO I did not see in the gist. Can you re-test with 1.1.6 or trunk/1.2 please, and if the problem still exists reopen this bug with a small reproducible case?

Show
Charles Oliver Nutter added a comment - 12/Feb/09 12:58 AM I guess I don't follow. The example does not appear to be complete; type declarations are missing on the two "id" parameters, and the script is not runnable without some componentDAO I did not see in the gist. Can you re-test with 1.1.6 or trunk/1.2 please, and if the problem still exists reopen this bug with a small reproducible case?

People

  • Assignee:
    Charles Oliver Nutter
    Reporter:
    K. Adam Christensen
Vote (0)
Watch (0)

Dates

  • Created:
    23/Oct/08 3:27 PM
    Updated:
    27/Oct/09 1:48 PM
    Resolved:
    12/Feb/09 12:58 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.