This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
FYI: Removing redundant modifiers (Part 15)
- From: Michael Koch <konqueror at gmx dot de>
- To: java-patches at gcc dot gnu dot org
- Date: Sat, 11 Oct 2003 21:04:27 +0200
- Subject: FYI: Removing redundant modifiers (Part 15)
Hi list,
MODIFIERS.
Michael
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/libjava/ChangeLog,v
retrieving revision 1.2250
diff -u -b -B -r1.2250 ChangeLog
--- ChangeLog 11 Oct 2003 18:56:22 -0000 1.2250
+++ ChangeLog 11 Oct 2003 18:58:07 -0000
@@ -1,5 +1,27 @@
2003-10-11 Michael Koch <konqueror@gmx.de>
+ * java/security/Key.java,
+ * java/security/PrivateKey.java,
+ * java/security/PublicKey.java,
+ * java/security/acl/Acl.java,
+ * java/security/acl/AclEntry.java,
+ * java/security/acl/Group.java,
+ * java/security/acl/Owner.java,
+ * java/security/acl/Permission.java,
+ * java/security/cert/X509Extension.java,
+ * java/security/interfaces/DSAKey.java,
+ * java/security/interfaces/DSAKeyPairGenerator.java,
+ * java/security/interfaces/DSAParams.java,
+ * java/security/interfaces/DSAPrivateKey.java,
+ * java/security/interfaces/DSAPublicKey.java,
+ * java/security/interfaces/RSAKey.java,
+ * java/security/interfaces/RSAPrivateCrtKey.java,
+ * java/security/interfaces/RSAPrivateKey.java,
+ * java/security/interfaces/RSAPublicKey.java:
+ Removed redundant modifiers.
+
+2003-10-11 Michael Koch <konqueror@gmx.de>
+
* gnu/java/rmi/server/ProtocolConstants.java,
gnu/java/security/der/DER.java:
Removing redundant modifiers.
Index: java/security/Key.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/Key.java,v
retrieving revision 1.9
diff -u -b -B -r1.9 Key.java
--- java/security/Key.java 10 May 2003 07:12:47 -0000 1.9
+++ java/security/Key.java 11 Oct 2003 18:58:07 -0000
@@ -64,7 +64,7 @@
/**
* The version identifier used for serialization.
*/
- public static final long serialVersionUID = 6603384152749567654L;
+ long serialVersionUID = 6603384152749567654L;
/**
* This method returns the name of the algorithm for this key. This is a
Index: java/security/PrivateKey.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/PrivateKey.java,v
retrieving revision 1.7
diff -u -b -B -r1.7 PrivateKey.java
--- java/security/PrivateKey.java 10 May 2003 07:12:47 -0000 1.7
+++ java/security/PrivateKey.java 11 Oct 2003 18:58:07 -0000
@@ -58,5 +58,5 @@
/**
* The version identifier used for serialization.
*/
- public static final long serialVersionUID = 6034044314589513430L;
+ long serialVersionUID = 6034044314589513430L;
} // interface PrivateKey
Index: java/security/PublicKey.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/PublicKey.java,v
retrieving revision 1.7
diff -u -b -B -r1.7 PublicKey.java
--- java/security/PublicKey.java 10 May 2003 07:12:47 -0000 1.7
+++ java/security/PublicKey.java 11 Oct 2003 18:58:07 -0000
@@ -56,5 +56,5 @@
/**
* The version identifier used for serialization.
*/
- public static final long serialVersionUID = 7187392471159151072L;
+ long serialVersionUID = 7187392471159151072L;
} // interface PublicKey
Index: java/security/acl/Acl.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/acl/Acl.java,v
retrieving revision 1.3
diff -u -b -B -r1.3 Acl.java
--- java/security/acl/Acl.java 26 Aug 2003 22:42:36 -0000 1.3
+++ java/security/acl/Acl.java 11 Oct 2003 18:58:07 -0000
@@ -69,7 +69,7 @@
*
* @return The name of this ACL
*/
- public abstract String getName();
+ String getName();
/**
* This method sets the name of the ACL
@@ -79,7 +79,7 @@
*
* @exception NotOwnerException If the caller is not an owner of this ACL.
*/
- public abstract void setName(Principal caller, String name)
+ void setName(Principal caller, String name)
throws NotOwnerException;
/**
@@ -88,11 +88,13 @@
* @param caller The <code>Principal</code> requesting the addition
* @param entry The ACL entry to add
*
- * @return <code>true</code> if the entry was added, <code>false</code> if there is already an entry of the same type for the <code>Principal</code>.
+ * @return <code>true</code> if the entry was added, <code>false</code>
+ * if there is already an entry of the same type for the
+ * <code>Principal</code>.
*
* @exception NotOwnerException If the caller is not an owner of this ACL.
*/
- public abstract boolean addEntry(Principal caller, AclEntry entry)
+ boolean addEntry(Principal caller, AclEntry entry)
throws NotOwnerException;
/**
@@ -101,11 +103,12 @@
* @param caller The <code>Principal</code> requesting the deletion.
* @param entry The ACL entry to delete
*
- * @return <code>true</code> if the entry was deleted, or <code>false</code> if this entry was not part of the ACL to begin with
+ * @return <code>true</code> if the entry was deleted, or <code>false</code>
+ * if this entry was not part of the ACL to begin with
*
* @exception NotOwnerException If the caller is not an owner of this ACL.
*/
- public abstract boolean removeEntry(Principal caller, AclEntry entry)
+ boolean removeEntry(Principal caller, AclEntry entry)
throws NotOwnerException;
/**
@@ -114,7 +117,7 @@
*
* @return An enumeration of the ACL entries
*/
- public abstract Enumeration entries();
+ Enumeration entries();
/**
* This method tests whether or not the specified <code>Principal</code>
@@ -123,9 +126,10 @@
* @param user The <code>Principal</code> to test
* @param perm The <code>Permission</code> to test for
*
- * @return <code>true</code> if the user has been granted the permission, <code>false</code> otherwise
+ * @return <code>true</code> if the user has been granted the permission,
+ * <code>false</code> otherwise
*/
- public abstract boolean checkPermission(Principal user, Permission perm);
+ boolean checkPermission(Principal user, Permission perm);
/**
* This method returns a list of <code>Permission</code>'s that are granted
@@ -138,12 +142,12 @@
*
* @return A list of permissions for the <code>Principal</code>.
*/
- public abstract Enumeration getPermissions(Principal user);
+ Enumeration getPermissions(Principal user);
/**
* This method returns the ACL as a <code>String</code>
*
* @return A <code>String</code> representation of this ACL
*/
- public abstract String toString();
+ String toString();
}
Index: java/security/acl/AclEntry.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/acl/AclEntry.java,v
retrieving revision 1.2
diff -u -b -B -r1.2 AclEntry.java
--- java/security/acl/AclEntry.java 22 Jan 2002 22:40:32 -0000 1.2
+++ java/security/acl/AclEntry.java 11 Oct 2003 18:58:07 -0000
@@ -63,7 +63,7 @@
*
* @return The <code>Principal</code> for this ACL entry
*/
- public abstract Principal getPrincipal();
+ Principal getPrincipal();
/**
* This method sets ths <code>Principal</code> associated with this
@@ -74,7 +74,7 @@
*
* @return <code>true</code> if the <code>Principal</code> was successfully set or <code>false</code> if this entry already has a <code>Principal</code>.
*/
- public abstract boolean setPrincipal(Principal user);
+ boolean setPrincipal(Principal user);
/**
* This method sets this ACL entry to be a <em>negative</em> entry, indicating
@@ -82,14 +82,14 @@
* to the entry's <code>Principal</code>. Note that there is no way to
* undo this operation.
*/
- public abstract void setNegativePermissions();
+ void setNegativePermissions();
/**
* This method tests whether or not this ACL entry is a negative entry or not.
*
* @return <code>true</code> if this ACL entry is negative, <code>false</code> otherwise
*/
- public abstract boolean isNegative();
+ boolean isNegative();
/**
* This method adds the specified permission to this ACL entry.
@@ -98,7 +98,7 @@
*
* @return <code>true</code> if the permission was added or <code>false</code> if it was already set for this entry
*/
- public abstract boolean addPermission(Permission permission);
+ boolean addPermission(Permission permission);
/**
* This method deletes the specified permission to this ACL entry.
@@ -107,7 +107,7 @@
*
* @return <code>true</code> if the permission was successfully deleted or <code>false</code> if the permission was not part of this ACL to begin with
*/
- public abstract boolean removePermission(Permission perm);
+ boolean removePermission(Permission perm);
/**
* This method tests whether or not the specified permission is associated
@@ -117,7 +117,7 @@
*
* @return <code>true</code> if this permission is associated with this entry or <code>false</code> otherwise
*/
- public abstract boolean checkPermission(Permission permission);
+ boolean checkPermission(Permission permission);
/**
* This method returns a list of all <code>Permission</code> objects
@@ -125,19 +125,19 @@
*
* @return A list of permissions for this ACL entry
*/
- public abstract Enumeration permissions();
+ Enumeration permissions();
/**
* This method returns this object as a <code>String</code>.
*
* @return A <code>String</code> representation of this object
*/
- public abstract String toString();
+ String toString();
/**
* This method returns a clone of this ACL entry
*
* @return A clone of this ACL entry
*/
- public abstract Object clone();
+ Object clone();
}
Index: java/security/acl/Group.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/acl/Group.java,v
retrieving revision 1.3
diff -u -b -B -r1.3 Group.java
--- java/security/acl/Group.java 22 Jan 2002 22:40:32 -0000 1.3
+++ java/security/acl/Group.java 11 Oct 2003 18:58:07 -0000
@@ -59,7 +59,7 @@
*
* @return <code>true</code> if the user was successfully added or <code>false</code> if the user is already a member
*/
- public abstract boolean addMember(Principal user);
+ boolean addMember(Principal user);
/**
* This method deletes a member from the group.
@@ -68,7 +68,7 @@
*
* @return <code>true</code> if the user was successfully deleted or <code>false</code> if the user is not a member of the group
*/
- public abstract boolean removeMember(Principal user);
+ boolean removeMember(Principal user);
/**
* This method tests whether or not a given <code>Principal</code> is a
@@ -78,7 +78,7 @@
*
* @return <code>true</code> if the user is member, <code>false</code> otherwise
*/
- public abstract boolean isMember(Principal member);
+ boolean isMember(Principal member);
/**
* This method returns a list of all members of the group as an
@@ -86,5 +86,5 @@
*
* @return The list of all members of the group
*/
- public abstract Enumeration members();
+ Enumeration members();
}
Index: java/security/acl/Owner.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/acl/Owner.java,v
retrieving revision 1.2
diff -u -b -B -r1.2 Owner.java
--- java/security/acl/Owner.java 22 Jan 2002 22:40:32 -0000 1.2
+++ java/security/acl/Owner.java 11 Oct 2003 18:58:07 -0000
@@ -64,7 +64,7 @@
*
* @exception NotOwnerException If the caller is not already an owner of this ACL
*/
- public abstract boolean addOwner(Principal caller, Principal owner)
+ boolean addOwner(Principal caller, Principal owner)
throws NotOwnerException;
/**
@@ -82,7 +82,7 @@
* @exception NotOwnerException If the caller is not already an owner of this ACL
* @exception LastOwnerException If completing the operation would delete the last ACL owner
*/
- public abstract boolean deleteOwner(Principal caller, Principal owner)
+ boolean deleteOwner(Principal caller, Principal owner)
throws NotOwnerException, LastOwnerException;
/**
@@ -91,5 +91,5 @@
*
* @return <code>true</code> if the <code>Principal</code> is an owner, <code>false</code> otherwise
*/
- public abstract boolean isOwner(Principal owner);
+ boolean isOwner(Principal owner);
}
Index: java/security/acl/Permission.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/acl/Permission.java,v
retrieving revision 1.2
diff -u -b -B -r1.2 Permission.java
--- java/security/acl/Permission.java 22 Jan 2002 22:40:32 -0000 1.2
+++ java/security/acl/Permission.java 11 Oct 2003 18:58:07 -0000
@@ -56,12 +56,12 @@
*
* @return <code>true</code> if the specified permission is the same as this one, <code>false</code> otherwise
*/
- public abstract boolean equals(Object perm);
+ boolean equals (Object perm);
/**
* This method returns this <code>Permission</code> as a <code>String</code>.
*
* @return A <code>String</code> representing this permission.
*/
- public String toString();
+ String toString();
}
Index: java/security/cert/X509Extension.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/cert/X509Extension.java,v
retrieving revision 1.4
diff -u -b -B -r1.4 X509Extension.java
--- java/security/cert/X509Extension.java 22 Jan 2002 22:40:33 -0000 1.4
+++ java/security/cert/X509Extension.java 11 Oct 2003 18:58:07 -0000
@@ -81,7 +81,7 @@
@return true if has unsupported extension, false otherwise
*/
- public boolean hasUnsupportedCriticalExtension();
+ boolean hasUnsupportedCriticalExtension();
/**
Returns a set of the CRITICAL extension OIDs from the
@@ -91,7 +91,7 @@
@return A Set containing the OIDs. If there are no CRITICAL
extensions or extensions at all this returns null.
*/
- public Set getCriticalExtensionOIDs();
+ Set getCriticalExtensionOIDs();
/**
Returns a set of the NON-CRITICAL extension OIDs from the
@@ -101,13 +101,13 @@
@return A Set containing the OIDs. If there are no NON-CRITICAL
extensions or extensions at all this returns null.
*/
- public Set getNonCriticalExtensionOIDs();
+ Set getNonCriticalExtensionOIDs();
/**
Returns the DER encoded OCTET string for the specified
extension value identified by a OID. The OID is a string
of number separated by periods. Ex: 12.23.45.67
*/
- public byte[] getExtensionValue(String oid);
+ byte[] getExtensionValue(String oid);
}
Index: java/security/interfaces/DSAKey.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/interfaces/DSAKey.java,v
retrieving revision 1.4
diff -u -b -B -r1.4 DSAKey.java
--- java/security/interfaces/DSAKey.java 22 Jan 2002 22:40:34 -0000 1.4
+++ java/security/interfaces/DSAKey.java 11 Oct 2003 18:58:07 -0000
@@ -52,5 +52,5 @@
*
* @return The DSA parameters
*/
- public abstract DSAParams getParams();
+ DSAParams getParams();
}
Index: java/security/interfaces/DSAKeyPairGenerator.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/interfaces/DSAKeyPairGenerator.java,v
retrieving revision 1.2
diff -u -b -B -r1.2 DSAKeyPairGenerator.java
--- java/security/interfaces/DSAKeyPairGenerator.java 22 Jan 2002 22:40:34 -0000 1.2
+++ java/security/interfaces/DSAKeyPairGenerator.java 11 Oct 2003 18:58:07 -0000
@@ -62,7 +62,7 @@
*
* @exception InvalidParameterException If the parameters passed are not valid
*/
- public abstract void initialize(DSAParams params, SecureRandom random)
+ void initialize (DSAParams params, SecureRandom random)
throws InvalidParameterException;
/**
@@ -80,7 +80,6 @@
*
* @exception InvalidParameterException If a parameter is invalid
*/
- public abstract void initialize(int modlen, boolean genParams,
- SecureRandom random)
+ void initialize (int modlen, boolean genParams, SecureRandom random)
throws InvalidParameterException;
}
Index: java/security/interfaces/DSAParams.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/interfaces/DSAParams.java,v
retrieving revision 1.3
diff -u -b -B -r1.3 DSAParams.java
--- java/security/interfaces/DSAParams.java 22 Jan 2002 22:40:34 -0000 1.3
+++ java/security/interfaces/DSAParams.java 11 Oct 2003 18:58:07 -0000
@@ -54,19 +54,19 @@
*
* @return The DSA base value
*/
- public abstract BigInteger getG();
+ BigInteger getG();
/**
* Returns the prime, or 'p' value
*
* @return The DSA prime value
*/
- public abstract BigInteger getP();
+ BigInteger getP();
/**
* Returns the subprime, or 'q' value
*
* @return The DSA subprime value
*/
- public abstract BigInteger getQ();
+ BigInteger getQ();
}
Index: java/security/interfaces/DSAPrivateKey.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/interfaces/DSAPrivateKey.java,v
retrieving revision 1.6
diff -u -b -B -r1.6 DSAPrivateKey.java
--- java/security/interfaces/DSAPrivateKey.java 22 Jan 2002 22:40:34 -0000 1.6
+++ java/security/interfaces/DSAPrivateKey.java 11 Oct 2003 18:58:07 -0000
@@ -52,5 +52,5 @@
/**
* This method returns the value of the DSA private key
*/
- public BigInteger getX();
+ BigInteger getX();
}
Index: java/security/interfaces/DSAPublicKey.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/interfaces/DSAPublicKey.java,v
retrieving revision 1.6
diff -u -b -B -r1.6 DSAPublicKey.java
--- java/security/interfaces/DSAPublicKey.java 22 Jan 2002 22:40:34 -0000 1.6
+++ java/security/interfaces/DSAPublicKey.java 11 Oct 2003 18:58:07 -0000
@@ -52,5 +52,5 @@
/**
* This method returns the value of the DSA public key
*/
- public BigInteger getY();
+ BigInteger getY();
}
Index: java/security/interfaces/RSAKey.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/interfaces/RSAKey.java,v
retrieving revision 1.2
diff -u -b -B -r1.2 RSAKey.java
--- java/security/interfaces/RSAKey.java 22 Jan 2002 22:40:34 -0000 1.2
+++ java/security/interfaces/RSAKey.java 11 Oct 2003 18:58:07 -0000
@@ -37,6 +37,8 @@
package java.security.interfaces;
+import java.math.BigInteger;
+
/**
A generic RSA Key interface for public and private keys
@@ -51,5 +53,5 @@
@returns a modulus
*/
- public java.math.BigInteger getModulus();
+ BigInteger getModulus();
}
Index: java/security/interfaces/RSAPrivateCrtKey.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/interfaces/RSAPrivateCrtKey.java,v
retrieving revision 1.3
diff -u -b -B -r1.3 RSAPrivateCrtKey.java
--- java/security/interfaces/RSAPrivateCrtKey.java 22 Jan 2002 22:40:34 -0000 1.3
+++ java/security/interfaces/RSAPrivateCrtKey.java 11 Oct 2003 18:58:07 -0000
@@ -54,40 +54,40 @@
*
* @return The public exponent for this key
*/
- public abstract BigInteger getPublicExponent();
+ BigInteger getPublicExponent();
/**
* Returns the primeP value
*
* @return The primeP value
*/
- public abstract BigInteger getPrimeP();
+ BigInteger getPrimeP();
/**
* Returns the primeQ value
*
* @return The primeQ value
*/
- public abstract BigInteger getPrimeQ();
+ BigInteger getPrimeQ();
/**
* Returns the primeExponentP
*
* @return The primeExponentP
*/
- public abstract BigInteger getPrimeExponentP();
+ BigInteger getPrimeExponentP();
/**
* Returns the primeExponentQ
*
* @return The primeExponentQ
*/
- public abstract BigInteger getPrimeExponentQ();
+ BigInteger getPrimeExponentQ();
/**
* Returns the CRT coefficient
*
* @return The CRT coefficient
*/
- public abstract BigInteger getCrtCoefficient();
+ BigInteger getCrtCoefficient();
}
Index: java/security/interfaces/RSAPrivateKey.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/interfaces/RSAPrivateKey.java,v
retrieving revision 1.3
diff -u -b -B -r1.3 RSAPrivateKey.java
--- java/security/interfaces/RSAPrivateKey.java 22 Jan 2002 22:40:34 -0000 1.3
+++ java/security/interfaces/RSAPrivateKey.java 11 Oct 2003 18:58:07 -0000
@@ -54,5 +54,5 @@
*
* @return The private exponent value for this key
*/
- public abstract BigInteger getPrivateExponent();
+ BigInteger getPrivateExponent();
}
Index: java/security/interfaces/RSAPublicKey.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/interfaces/RSAPublicKey.java,v
retrieving revision 1.3
diff -u -b -B -r1.3 RSAPublicKey.java
--- java/security/interfaces/RSAPublicKey.java 22 Jan 2002 22:40:34 -0000 1.3
+++ java/security/interfaces/RSAPublicKey.java 11 Oct 2003 18:58:07 -0000
@@ -54,5 +54,5 @@
*
* @return The public exponent value for this key
*/
- public abstract BigInteger getPublicExponent();
+ BigInteger getPublicExponent();
}