OSDN Git Service

2005-04-29 Mark Wielaard <mark@klomp.org>
authormkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 29 Apr 2005 06:13:11 +0000 (06:13 +0000)
committermkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 29 Apr 2005 06:13:11 +0000 (06:13 +0000)
* java/util/ResourceBundle.java (getObject): Clarify
MissingResourceException detailed message.
(tryBundle(String,ClassLoader)): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98976 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 9ea3de5..ba0e431 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 57a9bfc..1b45778 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;
          }