Code example for JarEntry

0
        JarEntry newJarEntry = new JarEntry(jarFile.getJarEntry(entryName));
        assertNotNull(newJarEntry);
 
        jarEntry = null;
        try { 
            newJarEntry = new JarEntry(jarEntry);
            fail("Should throw NullPointerException");
        } catch (NullPointerException e) {
            // Expected 
        } 
    } 
 
    /** 
     * java.util.jar.JarEntry#JarEntry(java.util.zip.ZipEntry) 
     */ 
    public void test_ConstructorLjava_util_zip_ZipEntry() { 
        assertNotNull("Jar file is null", jarFile);
        zipEntry = jarFile.getEntry(entryName);
        assertNotNull("Zip entry is null", zipEntry);
        jarEntry = new JarEntry(zipEntry);
        assertNotNull("Jar entry is null", jarEntry);