This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
MessageFormat
- To: java-patches at gcc dot gnu dot org
- Subject: MessageFormat
- From: Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>
- Date: Wed, 05 Sep 2001 19:33:51 +1200
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);
}
}