jdk/src/share/classes/sun/invoke/util/ValueConversions.java
changeset 10419 12c063b39232
parent 9780 6fc3b49cfee4
child 11534 9949ffb8eb3a
--- a/jdk/src/share/classes/sun/invoke/util/ValueConversions.java	Tue Aug 30 14:41:12 2011 +0100
+++ b/jdk/src/share/classes/sun/invoke/util/ValueConversions.java	Tue Aug 30 11:53:11 2011 -0700
@@ -677,9 +677,7 @@
             EMPTY = IMPL_LOOKUP.findStatic(THIS_CLASS, "empty", ignoreType.dropParameterTypes(0, 1));
             NEW_ARRAY = IMPL_LOOKUP.findStatic(THIS_CLASS, "newArray", MethodType.methodType(Object[].class, int.class));
         } catch (NoSuchMethodException | IllegalAccessException ex) {
-            Error err = new InternalError("uncaught exception");
-            err.initCause(ex);
-            throw err;
+            throw new InternalError("uncaught exception", ex);
         }
     }
 
@@ -693,9 +691,7 @@
                 COPY_AS_PRIMITIVE_ARRAY = IMPL_LOOKUP.findStatic(THIS_CLASS, "copyAsPrimitiveArray", MethodType.methodType(Object.class, Wrapper.class, Object[].class));
                 MAKE_LIST = IMPL_LOOKUP.findStatic(THIS_CLASS, "makeList", MethodType.methodType(List.class, Object[].class));
             } catch (ReflectiveOperationException ex) {
-                Error err = new InternalError("uncaught exception");
-                err.initCause(ex);
-                throw err;
+                throw new InternalError("uncaught exception", ex);
             }
         }
     }