You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by pe...@apache.org on 2005/01/06 19:27:14 UTC

cvs commit: ant/src/main/org/apache/tools/zip ZipShort.java ZipLong.java

peterreilly    2005/01/06 10:27:14

  Modified:    src/main/org/apache/tools/zip ZipShort.java ZipLong.java
  Log:
  checkstyle
  
  Revision  Changes    Path
  1.13      +7 -6      ant/src/main/org/apache/tools/zip/ZipShort.java
  
  Index: ZipShort.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/zip/ZipShort.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ZipShort.java	6 Dec 2004 09:28:40 -0000	1.12
  +++ ZipShort.java	6 Jan 2005 18:27:14 -0000	1.13
  @@ -1,5 +1,5 @@
   /*
  - * Copyright  2001-2002,2004 The Apache Software Foundation
  + * Copyright  2001-2002,2004-2005 The Apache Software Foundation
    *
    *  Licensed under the Apache License, Version 2.0 (the "License");
    *  you may not use this file except in compliance with the License.
  @@ -81,7 +81,7 @@
        * @param value the Java int to convert to bytes
        * @return the converted int as a byte array in big endian byte order
        */
  -    public static byte[] getBytes(int value){
  +    public static byte[] getBytes(int value) {
           byte[] result = new byte[2];
           result[0] = (byte) (value & 0xFF);
           result[1] = (byte) ((value & 0xFF00) >> 8);
  @@ -94,7 +94,7 @@
        * @param offset the offset to start
        * @return the correspondanding java int value
        */
  -    public static int getValue(byte[] bytes, int offset){
  +    public static int getValue(byte[] bytes, int offset) {
           int value = (bytes[offset + 1] << 8) & 0xFF00;
           value += (bytes[offset] & 0xFF);
           return value;
  @@ -105,13 +105,14 @@
        * @param bytes the array of bytes
        * @return the correspondanding java int value
        */
  -    public static int getValue(byte[] bytes){
  -        return getValue(bytes, 0);    
  +    public static int getValue(byte[] bytes) {
  +        return getValue(bytes, 0);
       }
   
       /**
        * Override to make two instances with same value equal.
        * @param o an object to compare
  +     * @return true if the objects are equal
        * @since 1.1
        */
       public boolean equals(Object o) {
  
  
  
  1.13      +7 -6      ant/src/main/org/apache/tools/zip/ZipLong.java
  
  Index: ZipLong.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/zip/ZipLong.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ZipLong.java	6 Dec 2004 09:28:40 -0000	1.12
  +++ ZipLong.java	6 Jan 2005 18:27:14 -0000	1.13
  @@ -1,5 +1,5 @@
   /*
  - * Copyright  2001-2002,2004 The Apache Software Foundation
  + * Copyright  2001-2002,2004-2005 The Apache Software Foundation
    *
    *  Licensed under the Apache License, Version 2.0 (the "License");
    *  you may not use this file except in compliance with the License.
  @@ -78,12 +78,12 @@
        * @param value the value to convert
        * @return value as four bytes in big endian byte order
        */
  -    public static byte[] getBytes(long value){
  +    public static byte[] getBytes(long value) {
           byte[] result = new byte[4];
           result[0] = (byte) ((value & 0xFF));
           result[1] = (byte) ((value & 0xFF00) >> 8);
           result[2] = (byte) ((value & 0xFF0000) >> 16);
  -        result[3] = (byte) ((value & 0xFF000000l) >> 24);
  +        result[3] = (byte) ((value & 0xFF000000L) >> 24);
           return result;
       }
   
  @@ -93,7 +93,7 @@
        * @param offset the offset to start
        * @return the correspondanding Java long value
        */
  -    public static long getValue(byte[] bytes, int offset){
  +    public static long getValue(byte[] bytes, int offset) {
           long value = (bytes[offset + 3] << 24) & 0xFF000000L;
           value += (bytes[offset + 2] << 16) & 0xFF0000;
           value += (bytes[offset + 1] << 8) & 0xFF00;
  @@ -106,13 +106,14 @@
        * @param bytes the array of bytes
        * @return the correspondanding Java long value
        */
  -    public static long getValue(byte[] bytes){
  +    public static long getValue(byte[] bytes) {
           return getValue(bytes, 0);
       }
   
       /**
        * Override to make two instances with same value equal.
        * @param o an object to compare
  +     * @return true if the objects are equal
        * @since 1.1
        */
       public boolean equals(Object o) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org