broken in merlin promoted build B42 (B41 works properly):
$ which java
java is /jini/files/jdk/promoted/1.4/B42/build/sparc/bin/java
$ cat Bar.java
import java.lang.reflect.*;
class Gub {
private void func() { System.out.println("func called"); }
}
public class Bar {
public static void main(String[] args) throws Exception {
Method meth = Gub.class.getDeclaredMethod("func", new Class[0]);
meth.setAccessible(true);
meth.invoke(new Gub(), new Object[0]);
}
}
$ javac Bar.java
$ java Bar
Exception in thread "main" java.lang.IllegalAccessException
at java.lang.reflect.Method.invoke(Native Method)
at Bar.main(Bar.java:11)
$ setjdk 1.4-B41
$ which java
java is /jini/files/jdk/promoted/1.4/B41/build/sparc/bin/java
$ java Bar
func called
$
The same error occurs for Field objects:
$ which java
java is /jini/files/jdk/promoted/1.4/B42/build/sparc/bin/java
$ cat Foo.java
import java.lang.reflect.*;
class Baz {
private int i;
}
public class Foo {
public static void main(String[] args) throws Exception {
Field f = Baz.class.getDeclaredField("i");
f.setAccessible(true);
f.getInt(new Baz());
}
}
$ javac Foo.java
$ java Foo
Exception in thread "main" java.lang.IllegalAccessException
at java.lang.reflect.Field.getInt(Native Method)
at Foo.main(Foo.java:11)
$ setjdk 1.4-B41
$ java Foo
$
- duplicates
-
JDK-4392778 Drag & Drop of components is giving java.lang.InternalError on Solaris
-
- Closed
-
-
JDK-4393542 Call to Pattern.flags() to check Pattern.CANNON_EQ results in InternalError
-
- Closed
-
-
JDK-4395859 serialVersionUID field is ignored
-
- Closed
-
-
JDK-4392532 InternalError being raised when attempting to serialize an object.
-
- Closed
-
-
JDK-4392712 ava.lang.InternalError: Unable to access writeObject method
-
- Closed
-
-
JDK-4391658 tests fail when trying to create x509 certificate
-
- Closed
-
-
JDK-4393795 HotSpot Core dump when binding objects to the rmiregistry in Merlin-42
-
- Closed
-
-
JDK-4396291 Regression test/java/text/Format/DateFormatSymbolsSerializationTest.java failing
-
- Closed
-
-
JDK-4396295 Regression test/java/text/AttributedCharacterIterator/Attribute/ReadResolve.fail
-
- Closed
-
-
JDK-4396296 Regression test:/java/util/TimeZJone/bug4096952.java failing
-
- Closed
-