summaryrefslogtreecommitdiff
path: root/libjava/java/lang/Package.java
diff options
context:
space:
mode:
authorMichael Koch <konqueror@gmx.de>2004-01-06 08:34:58 +0000
committerMichael Koch <mkoch@gcc.gnu.org>2004-01-06 08:34:58 +0000
commit907cdc7fad039a88c619a92107186ef03b9a816f (patch)
treef3b23a77c72b7ec64fcadda0eeb7832c2f9626b5 /libjava/java/lang/Package.java
parent24746a428d28ff8398075c9be46cef326db45740 (diff)
downloadgcc-907cdc7fad039a88c619a92107186ef03b9a816f.tar.gz
2004-01-06 Michael Koch <konqueror@gmx.de>
* java/lang/Package.java (getPackage): Get the current class loader directly. * java/lang/SecurityManager.java (currentLoadedClass): Dont iterate over class contexts. (classLoaderDepth): Don't check class loaders if everything is allowed. From-SVN: r75465
Diffstat (limited to 'libjava/java/lang/Package.java')
-rw-r--r--libjava/java/lang/Package.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/libjava/java/lang/Package.java b/libjava/java/lang/Package.java
index f09814b6764..3045b50c2f1 100644
--- a/libjava/java/lang/Package.java
+++ b/libjava/java/lang/Package.java
@@ -269,8 +269,7 @@ public class Package
public static Package getPackage(String name)
{
// Get the caller's classloader
- Class c = VMSecurityManager.getClassContext()[1];
- ClassLoader cl = c.getClassLoader();
+ ClassLoader cl = VMSecurityManager.currentClassLoader();
return cl != null ? cl.getPackage(name) : null;
}