From 6c413a50e664e75c77f94aa1f441c1f876084140 Mon Sep 17 00:00:00 2001 From: Anthony Green Date: Sun, 17 Oct 1999 03:11:50 +0000 Subject: 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 --- libjava/java/util/ResourceBundle.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'libjava/java/util/ResourceBundle.java') diff --git a/libjava/java/util/ResourceBundle.java b/libjava/java/util/ResourceBundle.java index 5a2002aabb6..0c078cc1ee7 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 * @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 -- cgit v1.2.3