You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Nathan Beyer (JIRA)" <ji...@apache.org> on 2006/06/16 20:10:30 UTC

[jira] Closed: (HARMONY-605) [classlib][util] java.util.jar.getManifest() doesn't throw IllegalStateException if the jar file has been closed

     [ http://issues.apache.org/jira/browse/HARMONY-605?page=all ]
     
Nathan Beyer closed HARMONY-605:
--------------------------------


verified.

>  [classlib][util] java.util.jar.getManifest() doesn't throw IllegalStateException if the jar file has been closed
> -----------------------------------------------------------------------------------------------------------------
>
>          Key: HARMONY-605
>          URL: http://issues.apache.org/jira/browse/HARMONY-605
>      Project: Harmony
>         Type: Bug

>     Reporter: Vladimir Ivanov
>     Assignee: Nathan Beyer
>  Attachments: JarFile.diffs, JarFileTest.diff, ZipFile.diffs
>
> Compatibility issue: Harmony java.util.jar.getManifest() doesn't throw IllegalStateException if the jar file has been closed while RI does.
> According to J2SE specification
> IllegalStateException - may be thrown if the jar file has been closed
> =========================== test.java
> import java.io.File; 
> import java.util.jar.JarFile; 
> public class test {          
>     public static void main(String args[]) throws Exception { 
>         try { 
>             File f = new File("FilenoManifest.jar"); 
>             JarFile jf = new JarFile(f, false); 
>             jf.close(); 
>             jf.getManifest(); 
>             System.out.println("Failed");
>         } catch (IllegalStateException e) {
>             System.out.println("Passed");
>         } 
>     } 
> }
> Steps to Reproduce: 
> 1.Compile test.java 
> % javac -d test.java
> 2. create jar file "FileNoManifest.jar" without manifest  
> 3. Run test class
> The output on Harmony: 
> Failed 
> The output on RI: 
> passed
>  

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira