/** * Returns a clone of the entry for the given name or {@code null} if no * entry with this name exists. * * @param name the name of the ZIP entry. */ @Override public synchronized ZipEntry getEntry(String name) { final ZipEntry entry = super.getEntry(name); return entry != null ? entry.clone() : null; }
/** * Returns a clone of the entry for the given name or {@code null} if no * entry with this name exists. * * @param name the name of the ZIP entry. */ @Override public ZipEntry getEntry(String name) { final ZipEntry ze = super.getEntry(name); return ze != null ? ze.clone() : null; }
@Test public void testClone() { // TODO: Complete this test! ZipEntry clone = entry.clone(); assertNotSame(clone, entry); }
closeEntry(); final OutputMethod method = newOutputMethod(entry, process); method.init(entry.clone()); // test! method.init(entry); this.delegate = method.start();