+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.
* allow the given permission.
*/
public static void checkPermission(Permission perm)
+ throws AccessControlException
{
getContext().checkPermission(perm);
}
/* 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.
*
* @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
/* 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.
/**
* 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
*
* @return The name of this <code>Permission</code>
*/
- public String getName()
+ public final String getName()
{
return (name);
}
sm.checkPermission(this);
}
+ /**
+ * 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.
/* 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.
*
* @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
{
/* 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.
*
* @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>.
loadProviders();
}
+ // This class can't be instantiated.
+ private Security ()
+ {
+ }
+
private static void loadProviders()
{
String separator = System.getProperty("file.separator");
/* 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.
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
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
-public class UnresolvedPermission extends Permission implements Serializable
+public final class UnresolvedPermission
+ extends Permission
+ implements Serializable
{
/**
/* 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.
*
* @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.
*
* @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
/* 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.
@return a string representing the name
*/
- public String getFormat()
+ public final String getFormat()
{
return "PKCS#8";
}
/* 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.
@return a string representing the name
*/
- public String getFormat()
+ public final String getFormat()
{
return "X.509";
}