aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog5
-rw-r--r--libjava/java/lang/Package.java17
-rw-r--r--libjava/java/lang/reflect/Proxy.java2
3 files changed, 11 insertions, 13 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 0cadbb7..c49bece 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,8 @@
+2003-03-28 Tom Tromey <tromey@redhat.com>
+
+ * java/lang/reflect/Proxy.java: New version from Classpath.
+ * java/lang/Package.java: New version from Classpath.
+
2003-03-29 Ulrich Weigand <uweigand@de.ibm.com>
* configure.in (HAVE_BACKTRACE) [s390*-*-linux*]: Define.
diff --git a/libjava/java/lang/Package.java b/libjava/java/lang/Package.java
index 5c9dd30..f09814b6 100644
--- a/libjava/java/lang/Package.java
+++ b/libjava/java/lang/Package.java
@@ -1,5 +1,5 @@
/* Package.java -- information about a package
- Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -269,8 +269,7 @@ public class Package
public static Package getPackage(String name)
{
// Get the caller's classloader
- SecurityManager sm = System.getSecurityManager();
- Class c = sm.getClassContext()[1];
+ Class c = VMSecurityManager.getClassContext()[1];
ClassLoader cl = c.getClassLoader();
return cl != null ? cl.getPackage(name) : null;
}
@@ -284,8 +283,7 @@ public class Package
public static Package[] getPackages()
{
// Get the caller's classloader
- SecurityManager sm = System.getSecurityManager();
- Class c = sm.getClassContext()[1];
+ Class c = VMSecurityManager.getClassContext()[1];
ClassLoader cl = c.getClassLoader();
// Sun's implementation returns the packages loaded by the bootstrap
// classloader if cl is null, but right now our bootstrap classloader
@@ -313,12 +311,7 @@ public class Package
*/
public String toString()
{
- return "package: " + name +
- " spec: " + specTitle +
- " version: " + specVersion +
- " vendor: " + specVendor +
- " implementation: " + implTitle +
- " version: " + implVersion +
- " vendor: " + implVendor + " sealed: " + sealed;
+ return ("package " + name + (specTitle == null ? "" : ", " + specTitle)
+ + (specVersion == null ? "" : ", version " + specVersion));
}
} // class Package
diff --git a/libjava/java/lang/reflect/Proxy.java b/libjava/java/lang/reflect/Proxy.java
index 82cf372..e327f44 100644
--- a/libjava/java/lang/reflect/Proxy.java
+++ b/libjava/java/lang/reflect/Proxy.java
@@ -185,7 +185,7 @@ public class Proxy implements Serializable
* Proxy.
* @serial invocation handler associated with this proxy instance
*/
- protected final InvocationHandler h;
+ protected InvocationHandler h;
/**
* Constructs a new Proxy from a subclass (usually a proxy class),