MessageFormat
Bryce McKinlay
bryce@waitaki.otago.ac.nz
Wed Sep 5 00:31:00 GMT 2001
It's illegal to catch a checked exception which is never thrown from
within a corresponding try block. I guess GCJ doesn't detect this error,
but javac picked it up when I was building classpath.
regards
Bryce.
2001-09-05 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* java/text/MessageFormat.java (setLocale): Don't catch
ParseException
here, DecimalFormat.applyPattern() does not throw it.
--- MessageFormat.java 2001/09/05 00:00:55 1.7
+++ MessageFormat.java 2001/09/05 07:23:57
@@ -88,14 +88,7 @@
{
format = NumberFormat.getNumberInstance(loc);
DecimalFormat df = (DecimalFormat) format;
- try
- {
- df.applyPattern(style);
- }
- catch (ParseException x)
- {
- throw new IllegalArgumentException (x.getMessage());
- }
+ df.applyPattern(style);
}
}
More information about the Java-patches
mailing list