sbailliez 01/10/28 13:31:01
Modified: src/main/org/apache/tools/mail MailMessage.java
SmtpResponseReader.java
src/main/org/apache/tools/tar TarBuffer.java TarEntry.java
TarInputStream.java TarOutputStream.java
src/main/org/apache/tools/zip ZipOutputStream.java
Log:
Code clean up:
- removed useless/duplicate imports
- added explicit imports rather than *
- changed specifiers order to be conform to JLS.
Revision Changes Path
1.4 +9 -3
jakarta-ant/src/main/org/apache/tools/mail/MailMessage.java
Index: MailMessage.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/mail/MailMessage.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- MailMessage.java 2001/01/03 14:18:47 1.3
+++ MailMessage.java 2001/10/28 21:31:00 1.4
@@ -58,9 +58,15 @@
package org.apache.tools.mail;
-import java.io.*;
-import java.net.*;
-import java.util.*;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.io.BufferedOutputStream;
+import java.io.OutputStream;
+import java.net.Socket;
+import java.net.InetAddress;
+import java.util.Vector;
+import java.util.Hashtable;
+import java.util.Enumeration;
/**
* A class to help send SMTP email.
1.4 +4 -1
jakarta-ant/src/main/org/apache/tools/mail/SmtpResponseReader.java
Index: SmtpResponseReader.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/mail/SmtpResponseReader.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SmtpResponseReader.java 2001/01/03 14:18:47 1.3
+++ SmtpResponseReader.java 2001/10/28 21:31:00 1.4
@@ -50,7 +50,10 @@
package org.apache.tools.mail;
-import java.io.*;
+import java.io.InputStream;
+import java.io.IOException;
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
/**
* A wrapper around the raw input from the SMTP server that assembles
1.3 +5 -3 jakarta-ant/src/main/org/apache/tools/tar/TarBuffer.java
Index: TarBuffer.java
===================================================================
RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/tar/TarBuffer.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- TarBuffer.java 2001/01/03 14:18:48 1.2
+++ TarBuffer.java 2001/10/28 21:31:00 1.3
@@ -59,7 +59,9 @@
package org.apache.tools.tar;
-import java.io.*;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.IOException;
/**
* The TarBuffer class implements the tar archive concept
@@ -77,8 +79,8 @@
public class TarBuffer {
- public static final int DEFAULT_RCDSIZE = (512);
- public static final int DEFAULT_BLKSIZE = (DEFAULT_RCDSIZE * 20);
+ public final static int DEFAULT_RCDSIZE = (512);
+ public final static int DEFAULT_BLKSIZE = (DEFAULT_RCDSIZE * 20);
private InputStream inStream;
private OutputStream outStream;
1.8 +2 -2 jakarta-ant/src/main/org/apache/tools/tar/TarEntry.java
Index: TarEntry.java
===================================================================
RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/tar/TarEntry.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- TarEntry.java 2001/10/13 02:08:57 1.7
+++ TarEntry.java 2001/10/28 21:31:00 1.8
@@ -59,8 +59,8 @@
package org.apache.tools.tar;
-import java.io.*;
-import java.util.*;
+import java.io.File;
+import java.util.Date;
/**
* This class represents an entry in a Tar archive. It consists
1.4 +4 -1
jakarta-ant/src/main/org/apache/tools/tar/TarInputStream.java
Index: TarInputStream.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/tar/TarInputStream.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- TarInputStream.java 2001/02/03 14:24:43 1.3
+++ TarInputStream.java 2001/10/28 21:31:01 1.4
@@ -59,7 +59,10 @@
package org.apache.tools.tar;
-import java.io.*;
+import java.io.FilterInputStream;
+import java.io.InputStream;
+import java.io.IOException;
+import java.io.OutputStream;
/**
* The TarInputStream reads a UNIX tar archive as an InputStream.
1.5 +6 -4
jakarta-ant/src/main/org/apache/tools/tar/TarOutputStream.java
Index: TarOutputStream.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/tar/TarOutputStream.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- TarOutputStream.java 2001/02/01 15:52:17 1.4
+++ TarOutputStream.java 2001/10/28 21:31:01 1.5
@@ -59,7 +59,9 @@
package org.apache.tools.tar;
-import java.io.*;
+import java.io.FilterOutputStream;
+import java.io.OutputStream;
+import java.io.IOException;
/**
* The TarOutputStream writes a UNIX tar archive as an OutputStream.
@@ -69,9 +71,9 @@
* @author Timothy Gerard Endres <a href="mailto:[EMAIL PROTECTED]">[EMAIL
PROTECTED]</a>
*/
public class TarOutputStream extends FilterOutputStream {
- static public final int LONGFILE_ERROR = 0;
- static public final int LONGFILE_TRUNCATE = 1;
- static public final int LONGFILE_GNU = 2;
+ public final static int LONGFILE_ERROR = 0;
+ public final static int LONGFILE_TRUNCATE = 1;
+ public final static int LONGFILE_GNU = 2;
protected boolean debug;
protected int currSize;
1.4 +13 -11
jakarta-ant/src/main/org/apache/tools/zip/ZipOutputStream.java
Index: ZipOutputStream.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/zip/ZipOutputStream.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ZipOutputStream.java 2001/07/05 13:10:26 1.3
+++ ZipOutputStream.java 2001/10/28 21:31:01 1.4
@@ -54,7 +54,9 @@
package org.apache.tools.zip;
-import java.io.*;
+import java.io.OutputStream;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.util.Hashtable;
import java.util.Vector;
@@ -78,7 +80,7 @@
* will be called.</p>
*
* @author <a href="[EMAIL PROTECTED]">Stefan Bodewig</a>
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
*/
public class ZipOutputStream extends DeflaterOutputStream {
@@ -157,14 +159,14 @@
*
* @since 1.1
*/
- private static final byte[] ZERO = {0, 0};
+ private final static byte[] ZERO = {0, 0};
/**
* Helper, a 0 as ZipLong.
*
* @since 1.1
*/
- private static final byte[] LZERO = {0, 0, 0, 0};
+ private final static byte[] LZERO = {0, 0, 0, 0};
/**
* Holds the offsets of the LFH starts for each entry
@@ -189,14 +191,14 @@
*
* @since 1.1
*/
- public static final int DEFLATED = ZipEntry.DEFLATED;
+ public final static int DEFLATED = ZipEntry.DEFLATED;
/**
* Compression method for deflated entries.
*
* @since 1.1
*/
- public static final int STORED = ZipEntry.STORED;
+ public final static int STORED = ZipEntry.STORED;
/**
* Creates a new ZIP OutputStream filtering the underlying stream.
@@ -390,25 +392,25 @@
*
* @since 1.1
*/
- protected static final ZipLong LFH_SIG = new ZipLong(0X04034B50L);
+ protected final static ZipLong LFH_SIG = new ZipLong(0X04034B50L);
/**
* data descriptor signature
*
* @since 1.1
*/
- protected static final ZipLong DD_SIG = new ZipLong(0X08074B50L);
+ protected final static ZipLong DD_SIG = new ZipLong(0X08074B50L);
/**
* central file header signature
*
* @since 1.1
*/
- protected static final ZipLong CFH_SIG = new ZipLong(0X02014B50L);
+ protected final static ZipLong CFH_SIG = new ZipLong(0X02014B50L);
/**
* end of central dir signature
*
* @since 1.1
*/
- protected static final ZipLong EOCD_SIG = new ZipLong(0X06054B50L);
+ protected final static ZipLong EOCD_SIG = new ZipLong(0X06054B50L);
/**
* Writes the local file header entry
@@ -619,7 +621,7 @@
*
* @since 1.1
*/
- private static final ZipLong DOS_TIME_MIN = new ZipLong(0x00002100L);
+ private final static ZipLong DOS_TIME_MIN = new ZipLong(0x00002100L);
/**
* Convert a Date object to a DOS date/time field.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>