This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Hi,
Here are some small source cleanups from GNU Classpath:
2004-11-06 Michael Koch <konqueror@gmx.de>
* java/lang/StringBuffer.java,
java/lang/Throwable.java,
java/security/spec/DSAParameterSpec.java,
java/util/zip/ZipEntry.java,
java/util/zip/ZipFile.java,
java/util/zip/ZipInputStream.java,
java/util/zip/ZipOutputStream.java:
Removed redundant and reordered modifiers.
No real code changes.
Committed,
Mark
Index: java/lang/StringBuffer.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/StringBuffer.java,v
retrieving revision 1.20
diff -u -r1.20 StringBuffer.java
--- java/lang/StringBuffer.java 20 Apr 2004 12:30:19 -0000 1.20
+++ java/lang/StringBuffer.java 6 Nov 2004 16:07:21 -0000
@@ -109,7 +109,7 @@
/**
* The default capacity of a buffer.
*/
- private final static int DEFAULT_CAPACITY = 16;
+ private static final int DEFAULT_CAPACITY = 16;
/**
* Create a new StringBuffer with default capacity 16.
Index: java/lang/Throwable.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/Throwable.java,v
retrieving revision 1.17
diff -u -r1.17 Throwable.java
--- java/lang/Throwable.java 26 Sep 2004 17:11:14 -0000 1.17
+++ java/lang/Throwable.java 6 Nov 2004 16:07:21 -0000
@@ -401,8 +401,7 @@
*/
private static class StaticData
{
-
- final static String nl;
+ static final String nl;
static
{
Index: java/security/spec/DSAParameterSpec.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/spec/DSAParameterSpec.java,v
retrieving revision 1.4
diff -u -r1.4 DSAParameterSpec.java
--- java/security/spec/DSAParameterSpec.java 20 Apr 2004 14:44:57 -0000 1.4
+++ java/security/spec/DSAParameterSpec.java 6 Nov 2004 16:07:22 -0000
@@ -37,16 +37,17 @@
package java.security.spec;
-import java.security.interfaces.DSAParams;
+
import java.math.BigInteger;
+import java.security.interfaces.DSAParams;
/**
- DSA Parameter class Specification. Used to maintain the DSA
- Parameters.
-
- @since JDK 1.2
-
- @author Mark Benvenuto
+ * DSA Parameter class Specification. Used to maintain the DSA
+ * Parameters.
+ *
+ * @since 1.2
+ *
+ * @author Mark Benvenuto
*/
public class DSAParameterSpec implements AlgorithmParameterSpec, DSAParams
{
@@ -55,46 +56,46 @@
private BigInteger g = null;
/**
- Constructs a new DSAParameterSpec with the specified p, q, and g.
-
- @param p the prime
- @param q the sub-prime
- @param g the base
- */
+ * Constructs a new DSAParameterSpec with the specified p, q, and g.
+ *
+ * @param p the prime
+ * @param q the sub-prime
+ * @param g the base
+ */
public DSAParameterSpec(BigInteger p, BigInteger q, BigInteger g)
{
this.p = p;
this.q = q;
this.g = g;
}
+
/**
- Returns p for the DSA algorithm.
-
- @return Returns the requested BigInteger
- */
+ * Returns p for the DSA algorithm.
+ *
+ * @return Returns the requested BigInteger
+ */
public BigInteger getP()
{
return this.p;
}
/**
- Returns p for the DSA algorithm.
-
- @return Returns the requested BigInteger
- */
+ * Returns p for the DSA algorithm.
+ *
+ * @return Returns the requested BigInteger
+ */
public BigInteger getQ()
{
return this.q;
}
/**
- Returns g for the DSA algorithm.
-
- @return Returns the requested BigInteger
- */
+ * Returns g for the DSA algorithm.
+ *
+ * @return Returns the requested BigInteger
+ */
public BigInteger getG()
{
return this.g;
}
-
-}
+}
\ No newline at end of file
Index: java/util/zip/ZipEntry.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/util/zip/ZipEntry.java,v
retrieving revision 1.20
diff -u -r1.20 ZipEntry.java
--- java/util/zip/ZipEntry.java 6 Jun 2004 20:52:10 -0000 1.20
+++ java/util/zip/ZipEntry.java 6 Nov 2004 16:07:22 -0000
@@ -1,4 +1,4 @@
-/* java.util.zip.ZipEntry
+/* ZipEntry.java --
Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -71,15 +71,14 @@
int flags; /* used by ZipOutputStream */
int offset; /* used by ZipFile and ZipOutputStream */
-
/**
* Compression method. This method doesn't compress at all.
*/
- public final static int STORED = 0;
+ public static final int STORED = 0;
/**
* Compression method. This method uses the Deflater.
*/
- public final static int DEFLATED = 8;
+ public static final int DEFLATED = 8;
/**
* Creates a zip entry with the given name.
Index: java/util/zip/ZipFile.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/util/zip/ZipFile.java,v
retrieving revision 1.26
diff -u -r1.26 ZipFile.java
--- java/util/zip/ZipFile.java 20 Oct 2004 08:09:25 -0000 1.26
+++ java/util/zip/ZipFile.java 6 Nov 2004 16:07:22 -0000
@@ -148,7 +148,7 @@
* @exception IOException if a i/o error occured.
* @exception EOFException if the file ends prematurely
*/
- private final int readLeShort(DataInput di, byte[] b) throws IOException
+ private int readLeShort(DataInput di, byte[] b) throws IOException
{
di.readFully(b, 0, 2);
return (b[0] & 0xff) | (b[1] & 0xff) << 8;
@@ -165,14 +165,13 @@
* @exception IOException if a i/o error occured.
* @exception EOFException if the file ends prematurely
*/
- private final int readLeInt(DataInput di, byte[] b) throws IOException
+ private int readLeInt(DataInput di, byte[] b) throws IOException
{
di.readFully(b, 0, 4);
return ((b[0] & 0xff) | (b[1] & 0xff) << 8)
| ((b[2] & 0xff) | (b[3] & 0xff) << 8) << 16;
}
-
/**
* Read an unsigned short in little endian byte order from the given
* byte buffer at the given offset.
@@ -181,7 +180,7 @@
* @param off the offset to read from.
* @return The value read.
*/
- private final int readLeShort(byte[] b, int off)
+ private int readLeShort(byte[] b, int off)
{
return (b[off] & 0xff) | (b[off+1] & 0xff) << 8;
}
@@ -194,7 +193,7 @@
* @param off the offset to read from.
* @return The value read.
*/
- private final int readLeInt(byte[] b, int off)
+ private int readLeInt(byte[] b, int off)
{
return ((b[off] & 0xff) | (b[off+1] & 0xff) << 8)
| ((b[off+2] & 0xff) | (b[off+3] & 0xff) << 8) << 16;
Index: java/util/zip/ZipInputStream.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/util/zip/ZipInputStream.java,v
retrieving revision 1.19
diff -u -r1.19 ZipInputStream.java
--- java/util/zip/ZipInputStream.java 17 Jun 2003 12:07:56 -0000 1.19
+++ java/util/zip/ZipInputStream.java 6 Nov 2004 16:07:22 -0000
@@ -106,7 +106,7 @@
}
}
- private final int readLeByte() throws IOException
+ private int readLeByte() throws IOException
{
if (avail <= 0)
{
@@ -120,7 +120,7 @@
/**
* Read an unsigned short in little endian byte order.
*/
- private final int readLeShort() throws IOException
+ private int readLeShort() throws IOException
{
return readLeByte() | (readLeByte() << 8);
}
@@ -128,7 +128,7 @@
/**
* Read an int in little endian byte order.
*/
- private final int readLeInt() throws IOException
+ private int readLeInt() throws IOException
{
return readLeShort() | (readLeShort() << 16);
}
Index: java/util/zip/ZipOutputStream.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/util/zip/ZipOutputStream.java,v
retrieving revision 1.15
diff -u -r1.15 ZipOutputStream.java
--- java/util/zip/ZipOutputStream.java 31 May 2004 22:14:37 -0000 1.15
+++ java/util/zip/ZipOutputStream.java 6 Nov 2004 16:07:22 -0000
@@ -1,5 +1,5 @@
-/* java.util.zip.ZipOutputStream
- Copyright (C) 2001 Free Software Foundation, Inc.
+/* ZipOutputStream.java --
+ Copyright (C) 2001, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -71,17 +71,18 @@
/**
* Our Zip version is hard coded to 1.0 resp. 2.0
*/
- private final static int ZIP_STORED_VERSION = 10;
- private final static int ZIP_DEFLATED_VERSION = 20;
+ private static final int ZIP_STORED_VERSION = 10;
+ private static final int ZIP_DEFLATED_VERSION = 20;
/**
* Compression method. This method doesn't compress at all.
*/
- public final static int STORED = 0;
+ public static final int STORED = 0;
+
/**
* Compression method. This method uses the Deflater.
*/
- public final static int DEFLATED = 8;
+ public static final int DEFLATED = 8;
/**
* Creates a new Zip output stream, writing a zip archive.
@@ -136,7 +137,7 @@
/**
* Write an unsigned short in little endian byte order.
*/
- private final void writeLeShort(int value) throws IOException
+ private void writeLeShort(int value) throws IOException
{
out.write(value & 0xff);
out.write((value >> 8) & 0xff);
@@ -145,7 +146,7 @@
/**
* Write an int in little endian byte order.
*/
- private final void writeLeInt(int value) throws IOException
+ private void writeLeInt(int value) throws IOException
{
writeLeShort(value);
writeLeShort(value >> 16);
Attachment:
signature.asc
Description: This is a digitally signed message part
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |