--- a/jdk/src/share/classes/java/lang/Class.java Tue Aug 30 14:41:12 2011 +0100
+++ b/jdk/src/share/classes/java/lang/Class.java Tue Aug 30 11:53:11 2011 -0700
@@ -974,8 +974,7 @@
descriptor = (String) enclosingInfo[2];
assert((name != null && descriptor != null) || name == descriptor);
} catch (ClassCastException cce) {
- throw (InternalError)
- new InternalError("Invalid type in enclosing method information").initCause(cce);
+ throw new InternalError("Invalid type in enclosing method information", cce);
}
}
@@ -1241,8 +1240,7 @@
try {
return getName().substring(enclosingClass.getName().length());
} catch (IndexOutOfBoundsException ex) {
- throw (InternalError)
- new InternalError("Malformed class name").initCause(ex);
+ throw new InternalError("Malformed class name", ex);
}
}