Browse Source

checkstyle

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@476569 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 18 years ago
parent
commit
70c67a8e78
4 changed files with 17 additions and 7 deletions
  1. +6
    -4
      src/main/org/apache/tools/zip/JarMarker.java
  2. +3
    -0
      src/main/org/apache/tools/zip/UnrecognizedExtraField.java
  3. +2
    -2
      src/main/org/apache/tools/zip/ZipFile.java
  4. +6
    -1
      src/main/org/apache/tools/zip/ZipOutputStream.java

+ 6
- 4
src/main/org/apache/tools/zip/JarMarker.java View File

@@ -28,17 +28,19 @@ import java.util.zip.ZipException;
*/ */
public final class JarMarker implements ZipExtraField { public final class JarMarker implements ZipExtraField {


private static ZipShort ID = new ZipShort(0xCAFE);
private static ZipShort NULL = new ZipShort(0);
private static byte[] NO_BYTES = new byte[0];
private static JarMarker DEFAULT = new JarMarker();
private static final ZipShort ID = new ZipShort(0xCAFE);
private static final ZipShort NULL = new ZipShort(0);
private static final byte[] NO_BYTES = new byte[0];
private static final JarMarker DEFAULT = new JarMarker();


/** No-arg constructor */
public JarMarker() { public JarMarker() {
// empty // empty
} }


/** /**
* Since JarMarker is stateless we can always use the same instance. * Since JarMarker is stateless we can always use the same instance.
* @return the DEFAULT jarmaker.
*/ */
public static JarMarker getInstance() { public static JarMarker getInstance() {
return DEFAULT; return DEFAULT;


+ 3
- 0
src/main/org/apache/tools/zip/UnrecognizedExtraField.java View File

@@ -124,6 +124,9 @@ public class UnrecognizedExtraField implements ZipExtraField {
} }


/** /**
* @param data the array of bytes.
* @param offset the source location in the data array.
* @param length the number of bytes to use in the data array.
* @see ZipExtraField#parseFromLocalFileData(byte[], int, int) * @see ZipExtraField#parseFromLocalFileData(byte[], int, int)
*/ */
public void parseFromLocalFileData(byte[] data, int offset, int length) { public void parseFromLocalFileData(byte[] data, int offset, int length) {


+ 2
- 2
src/main/org/apache/tools/zip/ZipFile.java View File

@@ -72,8 +72,8 @@ public class ZipFile {
private Hashtable nameMap = new Hashtable(509); private Hashtable nameMap = new Hashtable(509);


private static final class OffsetEntry { private static final class OffsetEntry {
long headerOffset = -1;
long dataOffset = -1;
private long headerOffset = -1;
private long dataOffset = -1;
} }


/** /**


+ 6
- 1
src/main/org/apache/tools/zip/ZipOutputStream.java View File

@@ -193,6 +193,8 @@ public class ZipOutputStream extends FilterOutputStream {
*/ */
private String encoding = null; private String encoding = null;


// CheckStyle:VisibilityModifier OFF - bc

/** /**
* This Deflater object is used for output. * This Deflater object is used for output.
* *
@@ -217,6 +219,8 @@ public class ZipOutputStream extends FilterOutputStream {
*/ */
protected byte[] buf = new byte[512]; protected byte[] buf = new byte[512];


// CheckStyle:VisibilityModifier ON

/** /**
* Optional random access output. * Optional random access output.
* *
@@ -881,7 +885,8 @@ public class ZipOutputStream extends FilterOutputStream {
/** /**
* Assumes a negative integer really is a positive integer that * Assumes a negative integer really is a positive integer that
* has wrapped around and re-creates the original value. * has wrapped around and re-creates the original value.
*
* @param i the value to treat as unsigned int.
* @return the unsigned int as a long.
* @since 1.34 * @since 1.34
*/ */
protected static long adjustToLong(int i) { protected static long adjustToLong(int i) {


Loading…
Cancel
Save