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
This commit is contained in:
committed by
Anthony Green
parent
1b284f05ac
commit
6c413a50e6
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user