7013730: JSR 292 reflective operations should report errors with standard exception types
Summary: remove NoAccessException, replace it by ReflectiveOperationException subtypes; adjust javadoc of exceptions
Reviewed-by: twisti
diff --git a/test/java/dyn/JavaDocExamplesTest.java b/test/java/dyn/JavaDocExamplesTest.java
index 7e911e3..72a6285 100644
--- a/test/java/dyn/JavaDocExamplesTest.java
+++ b/test/java/dyn/JavaDocExamplesTest.java
@@ -74,7 +74,7 @@
// static final private MethodHandle HASHCODE_1 = LOOKUP.findVirtual(Object.class,
// "hashCode", methodType(int.class));
-// form required if NoAccessException is intercepted:
+// form required if ReflectiveOperationException is intercepted:
static final private MethodHandle CONCAT_2, HASHCODE_2;
static {
try {
@@ -82,7 +82,7 @@
"concat", methodType(String.class, String.class));
HASHCODE_2 = LOOKUP.findVirtual(Object.class,
"hashCode", methodType(int.class));
- } catch (NoAccessException ex) {
+ } catch (ReflectiveOperationException ex) {
throw new RuntimeException(ex);
}
}