]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Class.java (getPackage): Get package from VMClassLoader if needed.
authorTom Tromey <tromey@redhat.com>
Fri, 16 Dec 2005 21:38:45 +0000 (21:38 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Fri, 16 Dec 2005 21:38:45 +0000 (21:38 +0000)
* java/lang/Class.java (getPackage): Get package from
VMClassLoader if needed.

From-SVN: r108685

libjava/ChangeLog
libjava/java/lang/Class.java

index 35e8b551374fd6f2fb15fe9343c5a16a8d7f76d8..18fe970049f5d4e73e688e8a9d68004b6c2c16c3 100644 (file)
@@ -1,3 +1,8 @@
+2005-12-16  Tom Tromey  <tromey@redhat.com>
+
+       * java/lang/Class.java (getPackage): Get package from
+       VMClassLoader if needed.
+
 2005-12-16  Tom Tromey  <tromey@redhat.com>
 
        * testsuite/libjava.jacks/jacks.xfail
index da84bfd7f4ca7eeb2fdda9e31b0ab771db5e6fea..60ca4577e992612c1fe255fb7cbd41b9d1fb9145 100644 (file)
@@ -455,8 +455,7 @@ public final class Class implements Serializable
   /**
    * Returns the <code>Package</code> 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()));
   }
 
   /**