commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1154515 - in /commons/proper/compress/trunk/src: main/java/org/apache/commons/compress/archivers/ main/java/org/apache/commons/compress/archivers/zip/ main/java/org/apache/commons/compress/compressors/ test/java/org/apache/commons/compress...
Date Sat, 06 Aug 2011 13:20:23 GMT
Author: bodewig
Date: Sat Aug  6 13:20:22 2011
New Revision: 1154515

URL: http://svn.apache.org/viewvc?rev=1154515&view=rev
Log:
compile without warnings with -Xlint

Modified:
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveInputStream.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveOutputStream.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ExtraFieldUtils.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/Simple8BitZipEncoding.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/UnsupportedZipFeatureException.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/CompressorInputStream.java
    commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/LongPathTest.java
    commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java
    commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/changes/ChangeSetTestCase.java

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveInputStream.java?rev=1154515&r1=1154514&r2=1154515&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveInputStream.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveInputStream.java
Sat Aug  6 13:20:22 2011
@@ -120,6 +120,7 @@ public abstract class ArchiveInputStream
      * @deprecated this method may yield wrong results for large
      * archives, use #getBytesRead instead
      */
+    @Deprecated
     public int getCount() {
         return (int) bytesRead;
     }

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveOutputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveOutputStream.java?rev=1154515&r1=1154514&r2=1154515&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveOutputStream.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveOutputStream.java
Sat Aug  6 13:20:22 2011
@@ -141,6 +141,7 @@ public abstract class ArchiveOutputStrea
      * @deprecated this method may yield wrong results for large
      * archives, use #getBytesWritten instead
      */
+    @Deprecated
     public int getCount() {
         return (int) bytesWritten;
     }

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ExtraFieldUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ExtraFieldUtils.java?rev=1154515&r1=1154514&r2=1154515&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ExtraFieldUtils.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ExtraFieldUtils.java
Sat Aug  6 13:20:22 2011
@@ -124,6 +124,7 @@ public class ExtraFieldUtils {
      *
      * @since Apache Commons Compress 1.1
      */
+    @SuppressWarnings("fallthrough")
     public static ZipExtraField[] parse(byte[] data, boolean local,
                                         UnparseableExtraField onUnparseableData)
         throws ZipException {

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/Simple8BitZipEncoding.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/Simple8BitZipEncoding.java?rev=1154515&r1=1154514&r2=1154515&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/Simple8BitZipEncoding.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/Simple8BitZipEncoding.java
Sat Aug  6 13:20:22 2011
@@ -87,7 +87,7 @@ class Simple8BitZipEncoding implements Z
      * stored as an array of 128 chars.
      */
     public Simple8BitZipEncoding(char[] highChars) {
-        this.highChars = (char[]) highChars.clone();
+        this.highChars = highChars.clone();
         List<Simple8BitChar> temp =
             new ArrayList<Simple8BitChar>(this.highChars.length);
 

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/UnsupportedZipFeatureException.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/UnsupportedZipFeatureException.java?rev=1154515&r1=1154514&r2=1154515&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/UnsupportedZipFeatureException.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/UnsupportedZipFeatureException.java
Sat Aug  6 13:20:22 2011
@@ -29,6 +29,7 @@ public class UnsupportedZipFeatureExcept
 
     private final Feature reason;
     private final ZipArchiveEntry entry;
+    private static final long serialVersionUID = 4430521921766595597L;
 
     /**
      * Creates an exception.

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java?rev=1154515&r1=1154514&r2=1154515&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
Sat Aug  6 13:20:22 2011
@@ -105,6 +105,7 @@ public class ZipArchiveOutputStream exte
      * written in utf-8.
      * @deprecated use {@link GeneralPurposeBit#UFT8_NAMES_FLAG} instead
      */
+    @Deprecated
     public static final int EFS_FLAG = GeneralPurposeBit.UFT8_NAMES_FLAG;
 
     /**

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/CompressorInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/CompressorInputStream.java?rev=1154515&r1=1154514&r2=1154515&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/CompressorInputStream.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/CompressorInputStream.java
Sat Aug  6 13:20:22 2011
@@ -53,6 +53,7 @@ public abstract class CompressorInputStr
      * @deprecated this method may yield wrong results for large
      * archives, use #getBytesRead instead
      */
+    @Deprecated
     public int getCount() {
         return (int) bytesRead;
     }

Modified: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/LongPathTest.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/LongPathTest.java?rev=1154515&r1=1154514&r2=1154515&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/LongPathTest.java
(original)
+++ commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/LongPathTest.java
Sat Aug  6 13:20:22 2011
@@ -109,7 +109,7 @@ public class LongPathTest extends Abstra
             assertTrue(ais instanceof CpioArchiveInputStream);
             // Hack: cpio does not add trailing "/" to directory names
             for(int i=0; i < expected.size(); i++){
-                String ent = (String) expected.get(i);
+                String ent = expected.get(i);
                 if (ent.endsWith("/")){
                     expected.set(i, ent.substring(0, ent.length()-1));
                 }

Modified: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java?rev=1154515&r1=1154514&r2=1154515&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java
(original)
+++ commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java
Sat Aug  6 13:20:22 2011
@@ -119,7 +119,7 @@ public class ZipFileTest extends TestCas
     private static void assertEntryName(ArrayList<ZipArchiveEntry> entries,
                                         int index,
                                         String expectedName) {
-        ZipArchiveEntry ze = (ZipArchiveEntry) entries.get(index);
+        ZipArchiveEntry ze = entries.get(index);
         assertEquals("src/main/java/org/apache/commons/compress/archivers/zip/"
                      + expectedName + ".java",
                      ze.getName());

Modified: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/changes/ChangeSetTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/changes/ChangeSetTestCase.java?rev=1154515&r1=1154514&r2=1154515&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/changes/ChangeSetTestCase.java
(original)
+++ commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/changes/ChangeSetTestCase.java
Sat Aug  6 13:20:22 2011
@@ -88,7 +88,7 @@ public final class ChangeSetTestCase ext
             changes.add(e2, in2);
             
             assertEquals(1, changes.getChanges().size());
-            Change c = (Change)changes.getChanges().iterator().next();
+            Change c = changes.getChanges().iterator().next();
             assertEquals(in2, c.getInput());
         } finally {
             if (in != null)
@@ -120,7 +120,7 @@ public final class ChangeSetTestCase ext
             changes.add(e2, in2, false);
             
             assertEquals(1, changes.getChanges().size());
-            Change c = (Change)changes.getChanges().iterator().next();
+            Change c = changes.getChanges().iterator().next();
             assertEquals(in, c.getInput());
         } finally {
             if (in != null)



Mime
View raw message