Regression in newest MLVM build
Attila Szegedi
szegedia at gmail.com
Fri Jun 10 14:34:38 PDT 2011
I found a regression between Mac OS X MLVM build from April 4 and June 6 (based on bsd-port jdk7-b145). Here's a minimal reproducing testcase:
public class TestVarArgInvoke {
public static void main(String[] args) throws Throwable {
java.lang.invoke.MethodHandles.publicLookup().unreflect(
TestVarArgInvoke.class.getMethod("x", int.class, int[].class)).invokeWithArguments(
new TestVarArgInvoke(), 1, new int[] { 2 });
}
public void x(int a, int... b) {
System.out.println(a);
for(int x: b) {
System.out.println(x);
}
}
}
main() is expected to successfully invoke the method x(int, int...) and have it print "1\n2\n" (and it does on April 4 MLVM), but it fails with this exception on June 6 MLVM:
Exception in thread "main" java.lang.ClassCastException: [I cannot be cast to java.lang.Number
at sun.invoke.util.ValueConversions.primitiveConversion(ValueConversions.java:231)
at sun.invoke.util.ValueConversions.unboxInteger(ValueConversions.java:76)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:571)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:568)
at TestVarArgInvoke.main(TestVarArgInvoke.java:13)
Attila.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/mlvm-dev/attachments/20110610/06743768/attachment.html
More information about the mlvm-dev
mailing list