commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r741637 - in /commons/sandbox/compress/trunk/src: main/java/org/apache/commons/compress/archivers/jar/ main/java/org/apache/commons/compress/archivers/zip/ test/java/org/apache/commons/compress/archivers/ test/java/org/apache/commons/compre...
Date Fri, 06 Feb 2009 17:11:40 GMT
Author: bodewig
Date: Fri Feb  6 17:11:40 2009
New Revision: 741637

URL: http://svn.apache.org/viewvc?rev=741637&view=rev
Log:
rename ZipEntry to ZipArchiveEntry

Added:
    commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java
  (contents, props changed)
      - copied, changed from r741632, commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipEntry.java
Removed:
    commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipEntry.java
Modified:
    commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveEntry.java
    commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveInputStream.java
    commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveOutputStream.java
    commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
    commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
    commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java
    commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipOutputStream.java
    commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/JarTestCase.java
    commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java
    commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/changes/ChangeSetTestCase.java

Modified: commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveEntry.java
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveEntry.java?rev=741637&r1=741636&r2=741637&view=diff
==============================================================================
--- commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveEntry.java
(original)
+++ commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveEntry.java
Fri Feb  6 17:11:40 2009
@@ -21,17 +21,18 @@
 import java.security.cert.Certificate;
 import java.util.jar.Attributes;
 import java.util.jar.JarEntry;
+import java.util.zip.ZipEntry;
 import java.util.zip.ZipException;
 
 import org.apache.commons.compress.archivers.ArchiveEntry;
-import org.apache.commons.compress.archivers.zip.ZipEntry;
+import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
 
-public class JarArchiveEntry extends ZipEntry implements ArchiveEntry {
+public class JarArchiveEntry extends ZipArchiveEntry implements ArchiveEntry {
 
 	private Attributes manifestAttributes = null;
 	private Certificate[] certificates = null; 
 	
-	public JarArchiveEntry(java.util.zip.ZipEntry entry) throws ZipException {
+	public JarArchiveEntry(ZipEntry entry) throws ZipException {
 		super(entry);
 	}
 
@@ -39,7 +40,7 @@
 		super(name);
 	}
 
-	public JarArchiveEntry(ZipEntry entry) throws ZipException {
+	public JarArchiveEntry(ZipArchiveEntry entry) throws ZipException {
 		super(entry);
 	}
 

Modified: commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveInputStream.java
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveInputStream.java?rev=741637&r1=741636&r2=741637&view=diff
==============================================================================
--- commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveInputStream.java
(original)
+++ commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveInputStream.java
Fri Feb  6 17:11:40 2009
@@ -22,7 +22,7 @@
 import java.io.InputStream;
 
 import org.apache.commons.compress.archivers.ArchiveEntry;
-import org.apache.commons.compress.archivers.zip.ZipEntry;
+import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
 import org.apache.commons.compress.archivers.zip.ZipArchiveInputStream;
 
 public class JarArchiveInputStream extends ZipArchiveInputStream {
@@ -32,7 +32,7 @@
     }
         
     public ArchiveEntry getNextEntry() throws IOException {
-        ZipEntry entry = (ZipEntry)super.getNextEntry();
+        ZipArchiveEntry entry = (ZipArchiveEntry)super.getNextEntry();
         if(entry == null) {
             return null;
         } else {

Modified: commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveOutputStream.java
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveOutputStream.java?rev=741637&r1=741636&r2=741637&view=diff
==============================================================================
--- commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveOutputStream.java
(original)
+++ commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveOutputStream.java
Fri Feb  6 17:11:40 2009
@@ -22,7 +22,7 @@
 import java.io.OutputStream;
 
 import org.apache.commons.compress.archivers.ArchiveEntry;
-import org.apache.commons.compress.archivers.zip.ZipEntry;
+import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
 import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream;
 
 public class JarArchiveOutputStream extends ZipArchiveOutputStream {
@@ -33,6 +33,6 @@
 
 	public void putArchiveEntry(ArchiveEntry entry) throws IOException {
 		// TODO special jar stuff
-		super.putArchiveEntry((ZipEntry) entry);
+		super.putArchiveEntry((ZipArchiveEntry) entry);
 	}
 }

Copied: commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java
(from r741632, commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipEntry.java)
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java?p2=commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java&p1=commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipEntry.java&r1=741632&r2=741637&rev=741637&view=diff
==============================================================================
--- commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipEntry.java
(original)
+++ commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java
Fri Feb  6 17:11:40 2009
@@ -26,7 +26,7 @@
  * access to the internal and external file attributes.
  *
  */
-public class ZipEntry extends java.util.zip.ZipEntry
+public class ZipArchiveEntry extends java.util.zip.ZipEntry
     implements ArchiveEntry, Cloneable {
 
     public static final int PLATFORM_UNIX = 3;
@@ -45,7 +45,7 @@
      * @param name the name of the entry
      * @since 1.1
      */
-    public ZipEntry(String name) {
+    public ZipArchiveEntry(String name) {
         super(name);
     }
 
@@ -55,7 +55,7 @@
      * @since 1.1
      * @throws ZipException on error
      */
-    public ZipEntry(java.util.zip.ZipEntry entry) throws ZipException {
+    public ZipArchiveEntry(java.util.zip.ZipEntry entry) throws ZipException {
         super(entry);
         byte[] extra = entry.getExtra();
         if (extra != null) {
@@ -72,7 +72,7 @@
      * @throws ZipException on error
      * @since 1.1
      */
-    public ZipEntry(ZipEntry entry) throws ZipException {
+    public ZipArchiveEntry(ZipArchiveEntry entry) throws ZipException {
         this((java.util.zip.ZipEntry) entry);
         setInternalAttributes(entry.getInternalAttributes());
         setExternalAttributes(entry.getExternalAttributes());
@@ -82,17 +82,17 @@
     /**
      * @since 1.9
      */
-    protected ZipEntry() {
+    protected ZipArchiveEntry() {
         super("");
     }
 
     /**
      * Overwrite clone.
-     * @return a cloned copy of this ZipEntry
+     * @return a cloned copy of this ZipArchiveEntry
      * @since 1.1
      */
     public Object clone() {
-        ZipEntry e = (ZipEntry) super.clone();
+        ZipArchiveEntry e = (ZipArchiveEntry) super.clone();
 
         e.extraFields = extraFields != null ? (LinkedHashMap) extraFields.clone() : null;
         e.setInternalAttributes(getInternalAttributes());

Propchange: commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java
------------------------------------------------------------------------------
    svn:mergeinfo = 

Propchange: commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java?rev=741637&r1=741636&r2=741637&view=diff
==============================================================================
--- commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
(original)
+++ commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
Fri Feb  6 17:11:40 2009
@@ -38,7 +38,7 @@
         if(entry == null) {
             return null;
         }
-        return (ArchiveEntry)new ZipEntry(entry);
+        return (ArchiveEntry)new ZipArchiveEntry(entry);
     }
 
     public int read(byte[] b, int off, int len) throws IOException {

Modified: commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java?rev=741637&r1=741636&r2=741637&view=diff
==============================================================================
--- commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
(original)
+++ commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
Fri Feb  6 17:11:40 2009
@@ -34,7 +34,7 @@
     }
     
     public void putArchiveEntry(ArchiveEntry entry) throws IOException {
-        zipOut.putNextEntry((ZipEntry) entry);
+        zipOut.putNextEntry((ZipArchiveEntry) entry);
     }
 
     public void close() throws IOException {

Modified: commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java?rev=741637&r1=741636&r2=741637&view=diff
==============================================================================
--- commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java
(original)
+++ commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java
Fri Feb  6 17:11:40 2009
@@ -39,7 +39,7 @@
  * (which is required to work on ZIP files created by native zip tools
  * and is able to skip a preamble like the one found in self
  * extracting archives.  Furthermore it returns instances of
- * <code>org.apache.tools.zip.ZipEntry</code> instead of
+ * <code>org.apache.tools.zip.ZipArchiveEntry</code> instead of
  * <code>java.util.zip.ZipEntry</code>.</p>
  *
  * <p>It doesn't extend <code>java.util.zip.ZipFile</code> as it would
@@ -54,7 +54,7 @@
  *   <li>There is no getName method.</li>
  *   <li>entries has been renamed to getEntries.</li>
  *   <li>getEntries and getEntry return
- *   <code>org.apache.tools.zip.ZipEntry</code> instances.</li>
+ *   <code>org.apache.tools.zip.ZipArchiveEntry</code> instances.</li>
  *   <li>close is allowed to throw IOException.</li>
  * </ul>
  *
@@ -71,13 +71,13 @@
     private static final int POS_3 = 3;
 
     /**
-     * Maps ZipEntrys to Longs, recording the offsets of the local
+     * Maps ZipArchiveEntrys to Longs, recording the offsets of the local
      * file headers.
      */
     private final Map entries = new HashMap(HASH_SIZE);
 
     /**
-     * Maps String to ZipEntrys, name -> actual entry.
+     * Maps String to ZipArchiveEntrys, name -> actual entry.
      */
     private final Map nameMap = new HashMap(HASH_SIZE);
 
@@ -199,7 +199,7 @@
 
     /**
      * Returns all entries.
-     * @return all entries as {@link ZipEntry} instances
+     * @return all entries as {@link ZipArchiveEntry} instances
      */
     public Enumeration getEntries() {
         return Collections.enumeration(entries.keySet());
@@ -209,11 +209,11 @@
      * Returns a named entry - or <code>null</code> if no entry by
      * that name exists.
      * @param name name of the entry.
-     * @return the ZipEntry corresponding to the given name - or
+     * @return the ZipArchiveEntry corresponding to the given name - or
      * <code>null</code> if not present.
      */
-    public ZipEntry getEntry(String name) {
-        return (ZipEntry) nameMap.get(name);
+    public ZipArchiveEntry getEntry(String name) {
+        return (ZipArchiveEntry) nameMap.get(name);
     }
 
     /**
@@ -223,7 +223,7 @@
      * @throws IOException if unable to create an input stream from the zipenty
      * @throws ZipException if the zipentry has an unsupported compression method
      */
-    public InputStream getInputStream(ZipEntry ze)
+    public InputStream getInputStream(ZipArchiveEntry ze)
         throws IOException, ZipException {
         OffsetEntry offsetEntry = (OffsetEntry) entries.get(ze);
         if (offsetEntry == null) {
@@ -233,9 +233,9 @@
         BoundedInputStream bis =
             new BoundedInputStream(start, ze.getCompressedSize());
         switch (ze.getMethod()) {
-            case ZipEntry.STORED:
+            case ZipArchiveEntry.STORED:
                 return bis;
-            case ZipEntry.DEFLATED:
+            case ZipArchiveEntry.DEFLATED:
                 bis.addDummy();
                 return new InflaterInputStream(bis, new Inflater(true));
             default:
@@ -264,9 +264,9 @@
 
     /**
      * Reads the central directory of the given archive and populates
-     * the internal tables with ZipEntry instances.
+     * the internal tables with ZipArchiveEntry instances.
      *
-     * <p>The ZipEntrys will know all data that can be obtained from
+     * <p>The ZipArchiveEntrys will know all data that can be obtained from
      * the central directory alone, but not the data that requires the
      * local file header or additional data to be read.</p>
      */
@@ -287,7 +287,7 @@
         while (sig == cfhSig) {
             archive.readFully(cfh);
             int off = 0;
-            ZipEntry ze = new ZipEntry();
+            ZipArchiveEntry ze = new ZipArchiveEntry();
 
             int versionMadeBy = ZipShort.getValue(cfh, off);
             off += SHORT;
@@ -459,7 +459,7 @@
         throws IOException {
         Enumeration e = getEntries();
         while (e.hasMoreElements()) {
-            ZipEntry ze = (ZipEntry) e.nextElement();
+            ZipArchiveEntry ze = (ZipArchiveEntry) e.nextElement();
             OffsetEntry offsetEntry = (OffsetEntry) entries.get(ze);
             long offset = offsetEntry.headerOffset;
             archive.seek(offset + LFH_OFFSET_FOR_FILENAME_LENGTH);

Modified: commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipOutputStream.java
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipOutputStream.java?rev=741637&r1=741636&r2=741637&view=diff
==============================================================================
--- commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipOutputStream.java
(original)
+++ commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipOutputStream.java
Fri Feb  6 17:11:40 2009
@@ -95,7 +95,7 @@
      *
      * @since 1.1
      */
-    private ZipEntry entry;
+    private ZipArchiveEntry entry;
 
     /**
      * The file comment.
@@ -327,7 +327,7 @@
         closeEntry();
         cdOffset = written;
         for (Iterator i = entries.iterator(); i.hasNext(); ) {
-            writeCentralFileHeader((ZipEntry) i.next());
+            writeCentralFileHeader((ZipArchiveEntry) i.next());
         }
         cdLength = written - cdOffset;
         writeCentralDirectoryEnd();
@@ -408,7 +408,7 @@
      * @since 1.1
      * @throws IOException on error
      */
-    public void putNextEntry(ZipEntry ze) throws IOException {
+    public void putNextEntry(ZipArchiveEntry ze) throws IOException {
         closeEntry();
 
         entry = ze;
@@ -610,7 +610,7 @@
      *
      * @since 1.1
      */
-    protected void writeLocalFileHeader(ZipEntry ze) throws IOException {
+    protected void writeLocalFileHeader(ZipArchiveEntry ze) throws IOException {
         offsets.put(ze, ZipLong.getBytes(written));
 
         writeOut(LFH_SIG);
@@ -689,7 +689,7 @@
      *
      * @since 1.1
      */
-    protected void writeDataDescriptor(ZipEntry ze) throws IOException {
+    protected void writeDataDescriptor(ZipArchiveEntry ze) throws IOException {
         if (ze.getMethod() != DEFLATED || raf != null) {
             return;
         }
@@ -709,7 +709,7 @@
      *
      * @since 1.1
      */
-    protected void writeCentralFileHeader(ZipEntry ze) throws IOException {
+    protected void writeCentralFileHeader(ZipArchiveEntry ze) throws IOException {
         writeOut(CFH_SIG);
         written += WORD;
 

Modified: commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/JarTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/JarTestCase.java?rev=741637&r1=741636&r2=741637&view=diff
==============================================================================
--- commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/JarTestCase.java
(original)
+++ commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/JarTestCase.java
Fri Feb  6 17:11:40 2009
@@ -24,7 +24,7 @@
 import java.io.InputStream;
 import java.io.OutputStream;
 
-import org.apache.commons.compress.archivers.zip.ZipEntry;
+import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
 import org.apache.commons.compress.utils.IOUtils;
 
 import org.apache.commons.compress.AbstractTestCase;
@@ -40,11 +40,11 @@
         
         final ArchiveOutputStream os = new ArchiveStreamFactory().createArchiveOutputStream("jar",
out);
 
-        os.putArchiveEntry(new ZipEntry("testdata/test1.xml"));
+        os.putArchiveEntry(new ZipArchiveEntry("testdata/test1.xml"));
         IOUtils.copy(new FileInputStream(file1), os);
         os.closeArchiveEntry();
         
-        os.putArchiveEntry(new ZipEntry("testdata/test2.xml"));
+        os.putArchiveEntry(new ZipArchiveEntry("testdata/test2.xml"));
         IOUtils.copy(new FileInputStream(file2), os);
         os.closeArchiveEntry();
 
@@ -57,21 +57,21 @@
         final InputStream is = new FileInputStream(input);
         final ArchiveInputStream in = new ArchiveStreamFactory().createArchiveInputStream("jar",
is);
         
-        ZipEntry entry = (ZipEntry)in.getNextEntry();
+        ZipArchiveEntry entry = (ZipArchiveEntry)in.getNextEntry();
         File o = new File(dir, entry.getName());
         o.getParentFile().mkdirs();
         OutputStream out = new FileOutputStream(o);
         IOUtils.copy(in, out);
         out.close();
         
-        entry = (ZipEntry)in.getNextEntry();
+        entry = (ZipArchiveEntry)in.getNextEntry();
         o = new File(dir, entry.getName());
         o.getParentFile().mkdirs();
         out = new FileOutputStream(o);
         IOUtils.copy(in, out);
         out.close();
         
-        entry = (ZipEntry)in.getNextEntry();
+        entry = (ZipArchiveEntry)in.getNextEntry();
         o = new File(dir, entry.getName());
         o.getParentFile().mkdirs();
         out = new FileOutputStream(o);

Modified: commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java?rev=741637&r1=741636&r2=741637&view=diff
==============================================================================
--- commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java
(original)
+++ commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java
Fri Feb  6 17:11:40 2009
@@ -24,7 +24,7 @@
 import java.io.InputStream;
 import java.io.OutputStream;
 
-import org.apache.commons.compress.archivers.zip.ZipEntry;
+import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
 import org.apache.commons.compress.utils.IOUtils;
 
 import org.apache.commons.compress.AbstractTestCase;
@@ -41,11 +41,11 @@
         
         final ArchiveOutputStream os = new ArchiveStreamFactory().createArchiveOutputStream("zip",
out);
 
-        os.putArchiveEntry(new ZipEntry("testdata/test1.xml"));
+        os.putArchiveEntry(new ZipArchiveEntry("testdata/test1.xml"));
         IOUtils.copy(new FileInputStream(file1), os);
         os.closeArchiveEntry();
         
-        os.putArchiveEntry(new ZipEntry("testdata/test2.xml"));
+        os.putArchiveEntry(new ZipArchiveEntry("testdata/test2.xml"));
         IOUtils.copy(new FileInputStream(file2), os);
         os.closeArchiveEntry();
         
@@ -58,7 +58,7 @@
         final InputStream is = new FileInputStream(input);
         final ArchiveInputStream in = new ArchiveStreamFactory().createArchiveInputStream("zip",
is);
  
-        final ZipEntry entry = (ZipEntry)in.getNextEntry();
+        final ZipArchiveEntry entry = (ZipArchiveEntry)in.getNextEntry();
         final OutputStream out = new FileOutputStream(new File(dir, entry.getName()));
         
         IOUtils.copy(in, out);

Modified: commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/changes/ChangeSetTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/changes/ChangeSetTestCase.java?rev=741637&r1=741636&r2=741637&view=diff
==============================================================================
--- commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/changes/ChangeSetTestCase.java
(original)
+++ commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/changes/ChangeSetTestCase.java
Fri Feb  6 17:11:40 2009
@@ -30,7 +30,7 @@
 import org.apache.commons.compress.archivers.ar.ArArchiveEntry;
 import org.apache.commons.compress.archivers.jar.JarArchiveEntry;
 import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
-import org.apache.commons.compress.archivers.zip.ZipEntry;
+import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
 
 public final class ChangeSetTestCase extends AbstractTestCase {
 
@@ -132,7 +132,7 @@
 			
 			
 			final File file1 = getFile("test.txt");
-			ZipEntry entry = new ZipEntry("testdata/test.txt");
+			ZipArchiveEntry entry = new ZipArchiveEntry("testdata/test.txt");
 	        changes.add(entry, new FileInputStream(file1));
 			
 			final File input = getFile("bla.zip");



Mime
View raw message