aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/util/ResourceBundle.java
diff options
context:
space:
mode:
authorAnthony Green <green@cygnus.com>1999-10-17 03:11:50 +0000
committerAnthony Green <green@gcc.gnu.org>1999-10-17 03:11:50 +0000
commit6c413a50e664e75c77f94aa1f441c1f876084140 (patch)
treec92648414fd189d79211213f4fc2b16e607c106c /libjava/java/util/ResourceBundle.java
parent1b284f05acb025d025040466a23f9ca72548d7e7 (diff)
downloadgcc-6c413a50e664e75c77f94aa1f441c1f876084140.zip
gcc-6c413a50e664e75c77f94aa1f441c1f876084140.tar.gz
gcc-6c413a50e664e75c77f94aa1f441c1f876084140.tar.bz2
ClassLoader.java (getSystemResource): Use getSystemClassLoader instead of ClassLoader.system.
* java/lang/ClassLoader.java (getSystemResource): Use getSystemClassLoader instead of ClassLoader.system. (getSystemResourceAsStream): Ditto. * java/lang/natClassLoader.cc (redirect): Make static and remove #ifdef INTERPRETER so it is always defined. (getVMClassLoader0): Remove #ifdef INTERPRETER so it always returns a VMClassLoader. * java/util/ResourceBundle.java (trySomeGetBundle): Create a PropertyResourceBundle if a properties file is found before a ResourceBundle class. From-SVN: r30048
Diffstat (limited to 'libjava/java/util/ResourceBundle.java')
-rw-r--r--libjava/java/util/ResourceBundle.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/libjava/java/util/ResourceBundle.java b/libjava/java/util/ResourceBundle.java
index 5a2002a..0c078cc 100644
--- a/libjava/java/util/ResourceBundle.java
+++ b/libjava/java/util/ResourceBundle.java
@@ -8,6 +8,8 @@ details. */
package java.util;
+import java.io.InputStream;
+
/**
* @author Anthony Green <green@cygnus.com>
* @date November 26, 1998.
@@ -106,6 +108,23 @@ public abstract class ResourceBundle
// Fall through.
}
+ // Look for a properties file.
+ {
+ InputStream i =
+ ClassLoader.getSystemResourceAsStream (bundleName.replace ('.', '/')
+ + ".properties");
+ if (i != null)
+ {
+ try {
+ return new PropertyResourceBundle (i);
+ } catch (java.io.IOException e) {
+ // The docs don't appear to define what happens in
+ // this case, but it seems like continuing the
+ // search is a reasonable thing to do.
+ }
+ }
+ }
+
if (bundleName.equals(stopHere))
return result;
else