Incorrect subclass for constructor arg throws internal JRuby error
------------------------------------------------------------------
Key: JRUBY-2882
URL: http://jira.codehaus.org/browse/JRUBY-2882
Project: JRuby
Issue Type: Bug
Components: Java Integration
Reporter: Logan Barnett
Fix For: JRuby 1.1.4
JDialog only accepts a Dialog or awt.Frame for the first param. JInternalFrame
is neither.
{noformat}
internal_frame = Java::javax::swing::JFrame.new
Java::javax::swing::JDialog.new(internal_frame, true)
{noformat}
Stack trace:
{noformat}
Exception in thread "main" java.lang.NullPointerException
at org.jruby.javasupport.JavaProxyMethods.to_s(JavaProxyMethods.java:39)
at
org.jruby.javasupport.JavaProxyMethodsInvoker$to_s_s_method_0_0.call(Unknown
Source)
at org.jruby.RubyClass.invoke(RubyClass.java:354)
at
org.jruby.javasupport.util.RuntimeHelpers.invoke(RuntimeHelpers.java:308)
at org.jruby.RubyObject.inspect(RubyObject.java:1562)
at org.jruby.RubyObjectInvoker$inspect_method_0_0.call(Unknown Source)
at
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZero.call(JavaMethod.java:81)
at org.jruby.RubyClass.invoke(RubyClass.java:315)
at
org.jruby.javasupport.util.RuntimeHelpers.invoke(RuntimeHelpers.java:327)
at org.jruby.RubyObject.callMethod(RubyObject.java:692)
at org.jruby.javasupport.Java.argTypesDoNotMatch(Java.java:1164)
at
org.jruby.javasupport.Java.findMatchingCallableForArgs(Java.java:1014)
at org.jruby.javasupport.Java.matchingCallableArityTwo(Java.java:1041)
at
org.jruby.javasupport.methods.RubyToJavaInvoker.findCallableArityTwo(RubyToJavaInvoker.java:77)
at
org.jruby.javasupport.methods.ConstructorInvoker.call(ConstructorInvoker.java:110)
at
org.jruby.javasupport.methods.ConstructorInvoker.call(ConstructorInvoker.java:201)
at org.jruby.RubyClass.invoke(RubyClass.java:335)
at
org.jruby.javasupport.util.RuntimeHelpers.invoke(RuntimeHelpers.java:298)
at
org.jruby.javasupport.ConcreteJavaProxy$2.call(ConcreteJavaProxy.java:51)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:183)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:447)
at org.jruby.RubyClass$SpecificArityNew.call(RubyClass.java:443)
at
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:167)
at
org.jruby.javasupport.ConcreteJavaProxy$ConcreteNewMethod.call(ConcreteJavaProxy.java:204)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.cacheAndCall(CallSite.java:171)
at
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:435)
at
ruby.Users.logan.dev.jruby.internal_frame_dialog_test.__file__(internal_frame_dialog_test.rb:2)
at
ruby.Users.logan.dev.jruby.internal_frame_dialog_test.__file__(internal_frame_dialog_test.rb)
at
ruby.Users.logan.dev.jruby.internal_frame_dialog_test.load(internal_frame_dialog_test.rb)
at org.jruby.Ruby.runScript(Ruby.java:542)
at org.jruby.Ruby.runNormally(Ruby.java:455)
at org.jruby.Ruby.runFromMain(Ruby.java:328)
at org.jruby.Main.run(Main.java:194)
at org.jruby.Main.run(Main.java:91)
at org.jruby.Main.main(Main.java:82)
{noformat}
--
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