ResourceBundle.java (getObject): Clarify MissingResourceException detailed message.

2005-04-29  Mark Wielaard  <mark@klomp.org>

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

From-SVN: r98976
This commit is contained in:
Mark Wielaard 2005-04-29 06:13:11 +00:00 committed by Michael Koch
parent 7789e4818a
commit 4b8853b021
2 changed files with 13 additions and 7 deletions

View 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:

View 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;
}