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
@@ -360,11 +360,11 @@ public abstract class ClassLoader {
|
||||
protected native Class findLoadedClass(String name);
|
||||
|
||||
public static final InputStream getSystemResourceAsStream(String name) {
|
||||
return system.getResourceAsStream (name);
|
||||
return getSystemClassLoader().getResourceAsStream (name);
|
||||
}
|
||||
|
||||
public static final URL getSystemResource(String name) {
|
||||
return system.getResource (name);
|
||||
return getSystemClassLoader().getResource (name);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -48,20 +48,14 @@ extern java::lang::Class ClassLoaderClass;
|
||||
|
||||
/////////// java.lang.ClassLoader native methods ////////////
|
||||
|
||||
#ifdef INTERPRETER
|
||||
gnu::gcj::runtime::VMClassLoader *redirect = 0;
|
||||
#endif
|
||||
static gnu::gcj::runtime::VMClassLoader *redirect = 0;
|
||||
|
||||
java::lang::ClassLoader*
|
||||
java::lang::ClassLoader::getVMClassLoader0 ()
|
||||
{
|
||||
#ifdef INTERPRETER
|
||||
if (redirect == 0)
|
||||
redirect = new gnu::gcj::runtime::VMClassLoader;
|
||||
return redirect;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
if (redirect == 0)
|
||||
redirect = new gnu::gcj::runtime::VMClassLoader;
|
||||
return redirect;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user