]> gcc.gnu.org Git - gcc.git/commitdiff
ResourceBundle.java (getObject): Clarify MissingResourceException detailed message.
authorMark Wielaard <mark@klomp.org>
Fri, 29 Apr 2005 06:13:11 +0000 (06:13 +0000)
committerMichael Koch <mkoch@gcc.gnu.org>
Fri, 29 Apr 2005 06:13:11 +0000 (06:13 +0000)
2005-04-29  Mark Wielaard  <mark@klomp.org>

* java/util/ResourceBundle.java (getObject): Clarify
MissingResourceException detailed message.
(tryBundle(String,ClassLoader)): Likewise.

From-SVN: r98976

libjava/ChangeLog
libjava/java/util/ResourceBundle.java

index 9ea3de597cb50774fc11cc3d9f76cc416ed9b300..ba0e431d9bafd17acc737de904a745cb1b3ea88d 100644 (file)
@@ -1,3 +1,9 @@
+2005-04-29  Mark Wielaard  <mark@klomp.org>
+
+       * java/util/ResourceBundle.java (getObject): Clarify
+       MissingResourceException detailed message.
+       (tryBundle(String,ClassLoader)): Likewise.
+
 2005-04-29  Robert Schuster  <thebohemian@gmx.net>
 
        * java/beans/FeatureDescriptor.java:
index 57a9bfc7dc7c91886422b57aef39bc2650e2fc8b..1b457785ce471b948006d2bbdd624ca2265ec91b 100644 (file)
@@ -1,5 +1,5 @@
 /* ResourceBundle -- aids in loading resource bundles
-   Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004
+   Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2005
    Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
@@ -41,8 +41,6 @@ package java.util;
 
 import java.io.IOException;
 import java.io.InputStream;
-import java.lang.ref.Reference;
-import java.lang.ref.SoftReference;
 
 /**
  * A resource bundle contains locale-specific data. If you need localized
@@ -175,9 +173,11 @@ public abstract class ResourceBundle
         if (o != null)
           return o;
       }
-    throw new MissingResourceException("Key not found", getClass().getName(),
-                                      key);
+
+    String className = getClass().getName();
+    throw new MissingResourceException("Key '" + key
+                                      + "'not found in Bundle: "
+                                      + className, className, key);
   }
 
   /**
@@ -493,7 +493,7 @@ public abstract class ResourceBundle
        catch (IOException ex)
          {
            MissingResourceException mre = new MissingResourceException
-             ("Failed to load bundle", localizedName, "");
+             ("Failed to load bundle: " + localizedName, localizedName, "");
            mre.initCause(ex);
            throw mre;
          }
This page took 0.077536 seconds and 5 git commands to generate.