diff options
Diffstat (limited to 'libjava/java/io/SerializablePermission.java')
-rw-r--r-- | libjava/java/io/SerializablePermission.java | 105 |
1 files changed, 52 insertions, 53 deletions
diff --git a/libjava/java/io/SerializablePermission.java b/libjava/java/io/SerializablePermission.java index d9dc3dd..85b9cdf 100644 --- a/libjava/java/io/SerializablePermission.java +++ b/libjava/java/io/SerializablePermission.java @@ -1,5 +1,5 @@ /* SerializablePermission.java -- Basic permissions related to serialization. - Copyright (C) 1998, 2000 Free Software Foundation, Inc. + Copyright (C) 1998, 2000, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -55,64 +55,63 @@ import java.security.BasicPermission; * * @see java.security.BasicPermission * - * @version 0.0 - * * @author Aaron M. Renn (arenn@urbanophile.com) */ public final class SerializablePermission extends BasicPermission { static final long serialVersionUID = 8537212141160296410L; -/* - * Class Variables - */ - -private static final String[] legal_names = { "enableSubclassImplementation", - "enableSubstitution" }; -/*************************************************************************/ - -/* - * Constructors - */ - -/** - * This method initializes a new instance of <code>SerializablePermission</code> - * that has the specified name. - * - * @param name The name of the permission. - * - * @exception IllegalArgumentException If the name is not valid for this class. - */ -public -SerializablePermission(String name) -{ - this(name, null); -} - -/*************************************************************************/ - -/** - * This method initializes a new instance of <code>SerializablePermission</code> - * that has the specified name and action list. Note that the action list - * is unused in this class. - * - * @param name The name of the permission. - * @param actions The action list (unused). - * - * @exception IllegalArgumentException If the name is not valid for this class. - */ -public -SerializablePermission(String name, String actions) -{ - super(name, actions); - - for (int i = 0; i < legal_names.length; i++) - if (legal_names[i].equals(name)) - return; - - throw new IllegalArgumentException("Bad permission name: " + name); -} - + /* + * Class Variables + */ + + private static final String[] legal_names = { "enableSubclassImplementation", + "enableSubstitution" }; + /*************************************************************************/ + + /* + * Constructors + */ + + /** + * This method initializes a new instance of + * <code>SerializablePermission</code> + * that has the specified name. + * + * @param name The name of the permission. + * + * @exception IllegalArgumentException If the name is not valid for + * this class. + */ + public SerializablePermission(String name) + { + this(name, null); + } + + /*************************************************************************/ + + /** + * This method initializes a new instance of + * <code>SerializablePermission</code> + * that has the specified name and action list. Note that the action list + * is unused in this class. + * + * @param name The name of the permission. + * @param actions The action list (unused). + * + * @exception IllegalArgumentException If the name is not valid for + * this class. + */ + public SerializablePermission(String name, String actions) + { + super(name, actions); + + for (int i = 0; i < legal_names.length; i++) + if (legal_names[i].equals(name)) + return; + + throw new IllegalArgumentException("Bad permission name: " + name); + } } // class SerializablePermission |