Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
1.0-JSR-4
-
None
-
None
Description
This code now fails:
package groovy.bugs;
import java.lang.reflect.*
class ReflectionInvokeBug extends GroovyTestCase {
void testInvoke()
}
with this exception:
[java] There was 1 error:
[java] 1) testInvoke(groovy.bugs.ReflectionInvokeBug)java.lang.ClassCastException: [Ljava.lang.Object;
[java] at gjdk.java.lang.Class_GroovyReflector.invoke(Unknown Source)
[java] at groovy.lang.MetaMethod.invoke(MetaMethod.java:110)
[java] at groovy.lang.MetaClass.doMethodInvoke(MetaClass.java:1557)
[java] at groovy.lang.MetaClass.invokeStaticMethod(MetaClass.java:520)
[java] at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:137)
[java] at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:104)
[java] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod(ScriptBytecodeAdapter.java:85)
[java] at groovy.bugs.ReflectionInvokeBug.testInvoke(Unknown Source)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at groovy.util.GroovyTestSuite.main(GroovyTestSuite.java:79)
[java]
This must be due to some recent change since I upgraded today and it worked before.
Attachments
Attachments
Issue Links
- depends upon
-
GROOVY-1023 methods with varargs are called with null when args are empty but should use an empty Array
- Closed
- relates to
-
GROOVY-6146 Calling a Java vararg method from Groovy with a null argument cast to the vararg type behaves differently than in Java
- Closed
-
GROOVY-10099 A single null argument to a varargs parameter is received as null
- Closed