diff -r 7fb9e32b146a src/share/classes/java/io/PrintStream.java
--- openjdk-boot/jdk/src/share/classes/java/io/PrintStream.java Mon Apr 11 14:58:51 2011 +0100
+++ openjdk-boot/jdk/src/share/classes/java/io/PrintStream.java Wed Apr 13 23:52:09 2011 +0100
@@ -91,7 +91,10 @@
requireNonNull(csn, "charsetName");
try {
return Charset.forName(csn);
- } catch (IllegalCharsetNameException|UnsupportedCharsetException unused) {
+ } catch (IllegalCharsetNameException unused) {
+ // UnsupportedEncodingException should be thrown
+ throw new UnsupportedEncodingException(csn);
+ } catch (UnsupportedCharsetException unused) {
// UnsupportedEncodingException should be thrown
throw new UnsupportedEncodingException(csn);
}
diff -r 7fb9e32b146a src/share/classes/java/io/PrintWriter.java
--- openjdk-boot/jdk/src/share/classes/java/io/PrintWriter.java Mon Apr 11 14:58:51 2011 +0100
+++ openjdk-boot/jdk/src/share/classes/java/io/PrintWriter.java Wed Apr 13 23:52:09 2011 +0100
@@ -85,7 +85,10 @@
Objects.requireNonNull(csn, "charsetName");
try {
return Charset.forName(csn);
- } catch (IllegalCharsetNameException|UnsupportedCharsetException unused) {
+ } catch (IllegalCharsetNameException unused) {
+ // UnsupportedEncodingException should be thrown
+ throw new UnsupportedEncodingException(csn);
+ } catch (UnsupportedCharsetException unused) {
// UnsupportedEncodingException should be thrown
throw new UnsupportedEncodingException(csn);
}
diff -r 7fb9e32b146a src/share/classes/java/util/Formatter.java
--- openjdk-boot/jdk/src/share/classes/java/util/Formatter.java Mon Apr 11 14:58:51 2011 +0100
+++ openjdk-boot/jdk/src/share/classes/java/util/Formatter.java Wed Apr 13 23:52:09 2011 +0100
@@ -1859,7 +1859,10 @@
Objects.requireNonNull(csn, "charsetName");
try {
return Charset.forName(csn);
- } catch (IllegalCharsetNameException|UnsupportedCharsetException unused) {
+ } catch (IllegalCharsetNameException unused) {
+ // UnsupportedEncodingException should be thrown
+ throw new UnsupportedEncodingException(csn);
+ } catch (UnsupportedCharsetException unused) {
// UnsupportedEncodingException should be thrown
throw new UnsupportedEncodingException(csn);
}
diff -r 7fb9e32b146a src/share/classes/java/util/Scanner.java
--- openjdk-boot/jdk/src/share/classes/java/util/Scanner.java Mon Apr 11 14:58:51 2011 +0100
+++ openjdk-boot/jdk/src/share/classes/java/util/Scanner.java Wed Apr 13 23:52:09 2011 +0100
@@ -633,7 +633,10 @@
Objects.requireNonNull(csn, "charsetName");
try {
return Charset.forName(csn);
- } catch (IllegalCharsetNameException|UnsupportedCharsetException e) {
+ } catch (IllegalCharsetNameException e) {
+ // IllegalArgumentException should be thrown
+ throw new IllegalArgumentException(e);
+ } catch (UnsupportedCharsetException e) {
// IllegalArgumentException should be thrown
throw new IllegalArgumentException(e);
}
@@ -684,7 +687,9 @@
Objects.requireNonNull(charsetName, "charsetName");
try {
return Charset.forName(charsetName).newDecoder();
- } catch (IllegalCharsetNameException|UnsupportedCharsetException unused) {
+ } catch (IllegalCharsetNameException unused) {
+ throw new IllegalArgumentException(charsetName);
+ } catch (UnsupportedCharsetException unused) {
throw new IllegalArgumentException(charsetName);
}
}
diff -r d28f54a421b1 src/share/classes/java/lang/management/ManagementFactory.java
--- openjdk-boot/jdk/src/share/classes/java/lang/management/ManagementFactory.java Mon Jun 13 15:58:42 2011 +0100
+++ openjdk-boot/jdk/src/share/classes/java/lang/management/ManagementFactory.java Tue Jun 21 01:53:32 2011 +0100
@@ -606,7 +606,9 @@
// create an MXBean proxy
return JMX.newMXBeanProxy(connection, objName, mxbeanInterface,
emitter);
- } catch (InstanceNotFoundException|MalformedObjectNameException e) {
+ } catch (InstanceNotFoundException e) {
+ throw new IllegalArgumentException(e);
+ } catch (MalformedObjectNameException e) {
throw new IllegalArgumentException(e);
}
}
diff -r d28f54a421b1 src/share/classes/sun/text/bidi/BidiBase.java
--- openjdk-boot/jdk/src/share/classes/sun/text/bidi/BidiBase.java Mon Jun 13 15:58:42 2011 +0100
+++ openjdk-boot/jdk/src/share/classes/sun/text/bidi/BidiBase.java Tue Jun 21 01:53:32 2011 +0100
@@ -3477,7 +3477,9 @@
try {
Field f = clazz.getField(name);
return f.get(null);
- } catch (NoSuchFieldException | IllegalAccessException x) {
+ } catch (NoSuchFieldException x) {
+ throw new AssertionError(x);
+ } catch (IllegalAccessException x) {
throw new AssertionError(x);
}
}
diff -r d28f54a421b1 src/share/classes/sun/invoke/util/ValueConversions.java
--- openjdk-boot/jdk/src/share/classes/sun/invoke/util/ValueConversions.java Mon Jun 13 15:58:42 2011 +0100
+++ openjdk-boot/jdk/src/share/classes/sun/invoke/util/ValueConversions.java Thu Jun 23 15:55:48 2011 +0100
@@ -661,7 +661,11 @@
IGNORE = IMPL_LOOKUP.findStatic(THIS_CLASS, "ignore", ignoreType);
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) {
+ } catch (NoSuchMethodException ex) {
+ Error err = new InternalError("uncaught exception");
+ err.initCause(ex);
+ throw err;
+ } catch (IllegalAccessException ex) {
Error err = new InternalError("uncaught exception");
err.initCause(ex);
throw err;