diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-13 23:21:07 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-13 23:21:07 +0000 |
commit | e749eef0565910d1f82d9fc0c2204ad8515ce479 (patch) | |
tree | e3fe20f418809950636da794c7f8c0da4cd92417 /libjava | |
parent | 977f01e1966adadd8a6d695aea5f4d2cb105d0ee (diff) | |
download | ppe42-gcc-e749eef0565910d1f82d9fc0c2204ad8515ce479.tar.gz ppe42-gcc-e749eef0565910d1f82d9fc0c2204ad8515ce479.zip |
* java/security/AccessController.java (checkPermission): Now
throws AccessControlException.
* java/security/AllPermission.java: Class now final.
* java/security/Permission.java (getName): Now final.
(name): Now private.
(equals): New abstract method.
* java/security/PermissionCollection.java (linesep): Now private.
* java/security/Permissions.java: Class now final.
* java/security/Security.java (Security): New private
constructor.
* java/security/UnresolvedPermission.java: Import
java.security.cert.Certificate. Class now final.
* java/security/acl/Group.java: Now extends Principal.
(isMember): Added Principal argument.
* java/security/spec/X509EncodedKeySpec.java (getFormat): Now
final.
* java/security/spec/PKCS8EncodedKeySpec.java (getFormat): Now
final.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46246 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 21 | ||||
-rw-r--r-- | libjava/java/security/AccessController.java | 1 | ||||
-rw-r--r-- | libjava/java/security/AllPermission.java | 4 | ||||
-rw-r--r-- | libjava/java/security/Permission.java | 11 | ||||
-rw-r--r-- | libjava/java/security/PermissionCollection.java | 9 | ||||
-rw-r--r-- | libjava/java/security/Permissions.java | 6 | ||||
-rw-r--r-- | libjava/java/security/Security.java | 5 | ||||
-rw-r--r-- | libjava/java/security/UnresolvedPermission.java | 8 | ||||
-rw-r--r-- | libjava/java/security/acl/Group.java | 6 | ||||
-rw-r--r-- | libjava/java/security/spec/PKCS8EncodedKeySpec.java | 4 | ||||
-rw-r--r-- | libjava/java/security/spec/X509EncodedKeySpec.java | 4 |
11 files changed, 59 insertions, 20 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 489f13de0ce..25974eb2a04 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,24 @@ +2001-10-13 Tom Tromey <tromey@redhat.com> + + * java/security/AccessController.java (checkPermission): Now + throws AccessControlException. + * java/security/AllPermission.java: Class now final. + * java/security/Permission.java (getName): Now final. + (name): Now private. + (equals): New abstract method. + * java/security/PermissionCollection.java (linesep): Now private. + * java/security/Permissions.java: Class now final. + * java/security/Security.java (Security): New private + constructor. + * java/security/UnresolvedPermission.java: Import + java.security.cert.Certificate. Class now final. + * java/security/acl/Group.java: Now extends Principal. + (isMember): Added Principal argument. + * java/security/spec/X509EncodedKeySpec.java (getFormat): Now + final. + * java/security/spec/PKCS8EncodedKeySpec.java (getFormat): Now + final. + 2001-10-12 Tom Tromey <tromey@redhat.com> * Makefile.in: Rebuilt. diff --git a/libjava/java/security/AccessController.java b/libjava/java/security/AccessController.java index c830fa4c3fa..0ef18c22d6f 100644 --- a/libjava/java/security/AccessController.java +++ b/libjava/java/security/AccessController.java @@ -65,6 +65,7 @@ public final class AccessController * allow the given permission. */ public static void checkPermission(Permission perm) + throws AccessControlException { getContext().checkPermission(perm); } diff --git a/libjava/java/security/AllPermission.java b/libjava/java/security/AllPermission.java index 1c1c94b7c39..31140c089ef 100644 --- a/libjava/java/security/AllPermission.java +++ b/libjava/java/security/AllPermission.java @@ -1,5 +1,5 @@ /* AllPermission.java -- Permission to do anything - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -35,7 +35,7 @@ package java.security; * * @author Aaron M. Renn (arenn@urbanophile.com) */ -public class AllPermission extends Permission +public final class AllPermission extends Permission { /** * This method initializes a new instance of <code>AllPermission</code>. It diff --git a/libjava/java/security/Permission.java b/libjava/java/security/Permission.java index 4866df35dc7..0a297e78887 100644 --- a/libjava/java/security/Permission.java +++ b/libjava/java/security/Permission.java @@ -1,5 +1,5 @@ /* Permission.java -- The superclass for all permission objects - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -59,7 +59,7 @@ public abstract class Permission implements Guard, Serializable /** * This is the name assigned to this permission object. */ - protected String name; // Taken from the serializable form information + private String name; // Taken from the serializable form information /** * This method initializes a new instance of <code>Permission</code> to @@ -75,7 +75,7 @@ public abstract class Permission implements Guard, Serializable * * @return The name of this <code>Permission</code> */ - public String getName() + public final String getName() { return (name); } @@ -107,6 +107,11 @@ public abstract class Permission implements Guard, Serializable } /** + * Check to see if this object equals OBJ. + */ + public abstract boolean equals (Object obj); + + /** * This method tests whether this <code>Permission</code> implies that the * specified <code>Permission</code> is also granted. * diff --git a/libjava/java/security/PermissionCollection.java b/libjava/java/security/PermissionCollection.java index f709a0ab423..69222826fe4 100644 --- a/libjava/java/security/PermissionCollection.java +++ b/libjava/java/security/PermissionCollection.java @@ -1,5 +1,5 @@ /* PermissionCollection.java -- A collection of permission objects - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -60,10 +60,11 @@ import java.util.Enumeration; * * @author Aaron M. Renn (arenn@urbanophile.com) */ -public abstract class PermissionCollection extends Object implements - Serializable +public abstract class PermissionCollection + extends Object + implements Serializable { - public static final String linesep = null; + private static final String linesep = null; static { diff --git a/libjava/java/security/Permissions.java b/libjava/java/security/Permissions.java index 44bc3d37c17..5cc962eca97 100644 --- a/libjava/java/security/Permissions.java +++ b/libjava/java/security/Permissions.java @@ -1,5 +1,5 @@ /* Permissions.java -- A collection of permission collections - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -45,7 +45,9 @@ import java.util.NoSuchElementException; * * @author Aaron M. Renn (arenn@urbanophile.com) */ -public class Permissions extends PermissionCollection implements Serializable +public final class Permissions + extends PermissionCollection + implements Serializable { /** * Holds instances of <code>AllPermission</code>. diff --git a/libjava/java/security/Security.java b/libjava/java/security/Security.java index c5187d80acf..95606e31f12 100644 --- a/libjava/java/security/Security.java +++ b/libjava/java/security/Security.java @@ -52,6 +52,11 @@ public final class Security extends Object loadProviders(); } + // This class can't be instantiated. + private Security () + { + } + private static void loadProviders() { String separator = System.getProperty("file.separator"); diff --git a/libjava/java/security/UnresolvedPermission.java b/libjava/java/security/UnresolvedPermission.java index f77ed627e67..8f9e06a1352 100644 --- a/libjava/java/security/UnresolvedPermission.java +++ b/libjava/java/security/UnresolvedPermission.java @@ -1,5 +1,5 @@ /* UnresolvedPermission.java -- Placeholder for unresolved permissions. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -27,6 +27,8 @@ executable file might be covered by the GNU General Public License. */ package java.security; import java.io.Serializable; +// All uses of Certificate in this file refer to this class. +import java.security.cert.Certificate; /** * This class is used to hold instances of all permissions that cannot @@ -44,7 +46,9 @@ import java.io.Serializable; * * @author Aaron M. Renn (arenn@urbanophile.com) */ -public class UnresolvedPermission extends Permission implements Serializable +public final class UnresolvedPermission + extends Permission + implements Serializable { /** diff --git a/libjava/java/security/acl/Group.java b/libjava/java/security/acl/Group.java index ccdd0370213..a4228f6869d 100644 --- a/libjava/java/security/acl/Group.java +++ b/libjava/java/security/acl/Group.java @@ -1,5 +1,5 @@ /* Group.java -- Represents a group of Principals - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -39,7 +39,7 @@ import java.util.Enumeration; * * @author Aaron M. Renn (arenn@urbanophile.com) */ -public interface Group +public interface Group extends Principal { /** * This method adds a new <code>Principal</code> to this group. @@ -67,7 +67,7 @@ public interface Group * * @return <code>true</code> if the user is member, <code>false</code> otherwise */ - public abstract boolean isMember(); + public abstract boolean isMember(Principal member); /** * This method returns a list of all members of the group as an diff --git a/libjava/java/security/spec/PKCS8EncodedKeySpec.java b/libjava/java/security/spec/PKCS8EncodedKeySpec.java index c2c0084833f..98d6153525f 100644 --- a/libjava/java/security/spec/PKCS8EncodedKeySpec.java +++ b/libjava/java/security/spec/PKCS8EncodedKeySpec.java @@ -1,5 +1,5 @@ /* PKCS8EncodedKeySpec.java --- PKCS8 Encoded Key Specificaton class - Copyright (C) 1999 Free Software Foundation, Inc. + Copyright (C) 1999, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -62,7 +62,7 @@ public class PKCS8EncodedKeySpec extends EncodedKeySpec @return a string representing the name */ - public String getFormat() + public final String getFormat() { return "PKCS#8"; } diff --git a/libjava/java/security/spec/X509EncodedKeySpec.java b/libjava/java/security/spec/X509EncodedKeySpec.java index 165b543c0e1..77b22932aa5 100644 --- a/libjava/java/security/spec/X509EncodedKeySpec.java +++ b/libjava/java/security/spec/X509EncodedKeySpec.java @@ -1,5 +1,5 @@ /* X509EncodedKeySpec.java --- X.509 Encoded Key Specificaton class - Copyright (C) 1999 Free Software Foundation, Inc. + Copyright (C) 1999, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -63,7 +63,7 @@ public class X509EncodedKeySpec extends EncodedKeySpec @return a string representing the name */ - public String getFormat() + public final String getFormat() { return "X.509"; } |