JRuby subclass cannot call super with arguments if parent constructor is varargs #2375
From http://jira.codehaus.org/browse/JRUBY-6656. See that issue for attached reproduction files.
I subclass a Java class that has a varargs constructor in JRuby, the JRuby class attempts to call super(a,b) to invoke the superclasses constructor and this fails with:
The text was updated successfully, but these errors were encountered:
…cases in #2375) ... since we're storing an annotation "flag" on the gen constructor thus can support this should be safe to land on JRuby 1.7 since users should not assume raising behaviour !
* jruby-1_7: fix compilation error left-over from 7774be5 some more var-args tests - make sure var-arg (overload) methods are covered move ALLOCATOR into a static field guess the ivar list size (most objects have only @ variables) private can be static handle Ruby super -> Java constructor with var-args correctly (fixes cases in #2375) mark generated proxy class constructor with @java.lang.SafeVarargs if super is var-args time to start sharing the generic (handles var-args) argument toJava conversion use (and cache) the more Java [array] version of the API to retrieve proxy constructors avoid deprecated JavaMethod.create + make sub-class helpers final do the toJava conversion on site instead of constant indirection esp. in loops Conflicts: core/src/main/java/org/jruby/RubyModule.java core/src/main/java/org/jruby/java/invokers/ConstructorInvoker.java core/src/main/java/org/jruby/java/invokers/InstanceMethodInvoker.java core/src/main/java/org/jruby/java/invokers/SingletonMethodInvoker.java core/src/main/java/org/jruby/java/invokers/StaticMethodInvoker.java test/test_higher_javasupport.rb