jdk/src/share/classes/java/lang/invoke/MethodHandleStatics.java
changeset 14089 0a41b980d62a
parent 13423 17843fff200d
child 16084 23e1be1fef19
child 14230 40cfabf65fc7
--- a/jdk/src/share/classes/java/lang/invoke/MethodHandleStatics.java	Thu Oct 18 11:09:00 2012 -0700
+++ b/jdk/src/share/classes/java/lang/invoke/MethodHandleStatics.java	Fri Oct 19 17:04:35 2012 -0700
@@ -93,6 +93,12 @@
     }
 
     // handy shared exception makers (they simplify the common case code)
+    /*non-public*/ static InternalError newInternalError(String message, Throwable cause) {
+        return new InternalError(message, cause);
+    }
+    /*non-public*/ static InternalError newInternalError(Throwable cause) {
+        return new InternalError(cause);
+    }
     /*non-public*/ static RuntimeException newIllegalStateException(String message) {
         return new IllegalStateException(message);
     }
@@ -109,7 +115,7 @@
         return new IllegalArgumentException(message(message, obj, obj2));
     }
     /*non-public*/ static Error uncaughtException(Exception ex) {
-        throw new InternalError("uncaught exception", ex);
+        throw newInternalError("uncaught exception", ex);
     }
     static Error NYI() {
         throw new AssertionError("NYI");