diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 35e8b551374..18fe970049f 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2005-12-16 Tom Tromey + + * java/lang/Class.java (getPackage): Get package from + VMClassLoader if needed. + 2005-12-16 Tom Tromey * testsuite/libjava.jacks/jacks.xfail diff --git a/libjava/java/lang/Class.java b/libjava/java/lang/Class.java index da84bfd7f4c..60ca4577e99 100644 --- a/libjava/java/lang/Class.java +++ b/libjava/java/lang/Class.java @@ -455,8 +455,7 @@ public final class Class implements Serializable /** * Returns the Package in which this class is defined * Returns null when this information is not available from the - * classloader of this class or when the classloader of this class - * is null. + * classloader of this class. * * @return the package for this class, if it is available * @since 1.2 @@ -466,7 +465,8 @@ public final class Class implements Serializable ClassLoader cl = getClassLoader(); if (cl != null) return cl.getPackage(getPackagePortion(getName())); - return null; + else + return VMClassLoader.getPackage(getPackagePortion(getName())); } /**