diff options
| author | Tom Tromey <tromey@redhat.com> | 2002-06-03 22:51:34 +0000 |
|---|---|---|
| committer | Tom Tromey <tromey@redhat.com> | 2002-06-03 22:51:34 +0000 |
| commit | 8087c760979ba45e4ec3bfc4bc3ebac905e9bd1e (patch) | |
| tree | 77af7314031d63ebe7c3d035e05d1b753ffaafeb /java/util/zip/ZipEntry.java | |
| parent | be784d5fd3902e5b365605fbdac7182ed4dab7e8 (diff) | |
| download | classpath-8087c760979ba45e4ec3bfc4bc3ebac905e9bd1e.tar.gz | |
* java/util/zip/ZipEntry.java (clone): Copy `extra' field.
* java/util/zip/ZipInputStream.java (getNextEntry): Use
createZipEntry.
Diffstat (limited to 'java/util/zip/ZipEntry.java')
| -rw-r--r-- | java/util/zip/ZipEntry.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/java/util/zip/ZipEntry.java b/java/util/zip/ZipEntry.java index d7dee0c2a..5a43b1f5a 100644 --- a/java/util/zip/ZipEntry.java +++ b/java/util/zip/ZipEntry.java @@ -1,5 +1,5 @@ /* java.util.zip.ZipEntry - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -163,7 +163,11 @@ public class ZipEntry implements ZipConstants, Cloneable { try { - return super.clone(); + // The JCL says that the `extra' field is also copied. + ZipEntry clone = (ZipEntry) super.clone(); + if (extra != null) + clone.extra = (byte[]) extra.clone(); + return clone; } catch (CloneNotSupportedException ex) { |
