This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[BC] Patch: FYI: ResourceBundle bug fix
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 20 Oct 2004 19:38:37 -0600
- Subject: [BC] Patch: FYI: ResourceBundle bug fix
- Reply-to: tromey at redhat dot com
I'm checking this in on the BC branch. I'll put it into Classpath
shortly.
This fixes a bug in ResourceBundle. It is valid to have a class with
the apparent name of a resource bundle which does not extend
ResourceBundle. In this case ResourceBundle should reject that class
and keep looking.
I've committed a test for this to Mauve.
This behavior is relied on by Eclipse. With this patch, plus the
InflaterInputStream patch from a couple of days ago (I still haven't
written the test for that, so it is not checked in), I can start
Eclipse 3 with the BC gij.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* java/util/ResourceBundle.java (tryBundle): Also ignore
ClassCastException.
Index: java/util/ResourceBundle.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/util/ResourceBundle.java,v
retrieving revision 1.23.24.2
diff -u -r1.23.24.2 ResourceBundle.java
--- java/util/ResourceBundle.java 12 Oct 2004 14:53:19 -0000 1.23.24.2
+++ java/util/ResourceBundle.java 21 Oct 2004 01:30:35 -0000
@@ -1,5 +1,5 @@
/* ResourceBundle -- aids in loading resource bundles
- Copyright (C) 1998, 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -478,6 +478,7 @@
catch (IllegalAccessException ex) {}
catch (InstantiationException ex) {}
catch (ClassNotFoundException ex) {}
+ catch (ClassCastException ex) {}
if (bundle == null)
{