aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/lang/Class.java
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2005-12-16 21:38:45 +0000
committerTom Tromey <tromey@gcc.gnu.org>2005-12-16 21:38:45 +0000
commitc015b2f85b4fa9f078fed9ca3c3516951624789d (patch)
tree940a7d033b6d8b02ff217208f736495af83aac11 /libjava/java/lang/Class.java
parentb642a22a13da77581f6d469b3382a44277ff2814 (diff)
downloadgcc-c015b2f85b4fa9f078fed9ca3c3516951624789d.zip
gcc-c015b2f85b4fa9f078fed9ca3c3516951624789d.tar.gz
gcc-c015b2f85b4fa9f078fed9ca3c3516951624789d.tar.bz2
Class.java (getPackage): Get package from VMClassLoader if needed.
* java/lang/Class.java (getPackage): Get package from VMClassLoader if needed. From-SVN: r108685
Diffstat (limited to 'libjava/java/lang/Class.java')
-rw-r--r--libjava/java/lang/Class.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/libjava/java/lang/Class.java b/libjava/java/lang/Class.java
index da84bfd..60ca457 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 <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()));
}
/**