You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Tony Wu (JIRA)" <ji...@apache.org> on 2006/11/10 04:25:37 UTC

[jira] Created: (HARMONY-2138) [classlib][luni]different behavior when delete file

[classlib][luni]different behavior when delete file
---------------------------------------------------

                 Key: HARMONY-2138
                 URL: http://issues.apache.org/jira/browse/HARMONY-2138
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Tony Wu


this testcase passed on RI but failed on harmony.
    
public void testDeleteJarFileUsingURLConnection() throws Exception {
        String jarFileName = "file.jar";
        String entry = "text.txt";
        File file = new File(jarFileName);
        FileOutputStream jarFile = new FileOutputStream(jarFileName);
        JarOutputStream out = new JarOutputStream(new BufferedOutputStream(
                jarFile));
        JarEntry jarEntry = new JarEntry(entry);
        out.putNextEntry(jarEntry);
        out.write(new byte[] { 'a', 'b', 'c' });
        out.close();

        URL url = new URL("jar:file:" + jarFileName + "!/" + entry);
        URLConnection conn = url.openConnection();
        conn.setUseCaches(false);
        InputStream is = conn.getInputStream();
        is.close();
        assertTrue(file.delete());
    }

-- 
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

        

[jira] Assigned: (HARMONY-2138) [classlib][luni]different behavior when delete file

Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2138?page=all ]

Paulex Yang reassigned HARMONY-2138:
------------------------------------

    Assignee: Paulex Yang

> [classlib][luni]different behavior when delete file
> ---------------------------------------------------
>
>                 Key: HARMONY-2138
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2138
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Tony Wu
>         Assigned To: Paulex Yang
>         Attachments: patch.diff
>
>
> this testcase passed on RI but failed on harmony.
>     
> public void testDeleteJarFileUsingURLConnection() throws Exception {
>         String jarFileName = "file.jar";
>         String entry = "text.txt";
>         File file = new File(jarFileName);
>         FileOutputStream jarFile = new FileOutputStream(jarFileName);
>         JarOutputStream out = new JarOutputStream(new BufferedOutputStream(
>                 jarFile));
>         JarEntry jarEntry = new JarEntry(entry);
>         out.putNextEntry(jarEntry);
>         out.write(new byte[] { 'a', 'b', 'c' });
>         out.close();
>         URL url = new URL("jar:file:" + jarFileName + "!/" + entry);
>         URLConnection conn = url.openConnection();
>         conn.setUseCaches(false);
>         InputStream is = conn.getInputStream();
>         is.close();
>         assertTrue(file.delete());
>     }

-- 
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

        

[jira] Resolved: (HARMONY-2138) [classlib][luni]different behavior when delete file

Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2138?page=all ]

Paulex Yang resolved HARMONY-2138.
----------------------------------

    Resolution: Fixed

Leo, patch applied at revision r475338, thanks a lot for this enhancement.

Tony, please verify the problem is fully resolved, thank you.

> [classlib][luni]different behavior when delete file
> ---------------------------------------------------
>
>                 Key: HARMONY-2138
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2138
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Tony Wu
>         Assigned To: Paulex Yang
>         Attachments: patch.diff
>
>
> this testcase passed on RI but failed on harmony.
>     
> public void testDeleteJarFileUsingURLConnection() throws Exception {
>         String jarFileName = "file.jar";
>         String entry = "text.txt";
>         File file = new File(jarFileName);
>         FileOutputStream jarFile = new FileOutputStream(jarFileName);
>         JarOutputStream out = new JarOutputStream(new BufferedOutputStream(
>                 jarFile));
>         JarEntry jarEntry = new JarEntry(entry);
>         out.putNextEntry(jarEntry);
>         out.write(new byte[] { 'a', 'b', 'c' });
>         out.close();
>         URL url = new URL("jar:file:" + jarFileName + "!/" + entry);
>         URLConnection conn = url.openConnection();
>         conn.setUseCaches(false);
>         InputStream is = conn.getInputStream();
>         is.close();
>         assertTrue(file.delete());
>     }

-- 
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

        

[jira] Updated: (HARMONY-2138) [classlib][luni]different behavior when delete file

Posted by "Leo Li (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2138?page=all ]

Leo Li updated HARMONY-2138:
----------------------------

    Attachment: patch.diff

Will somebody try the patch?

> [classlib][luni]different behavior when delete file
> ---------------------------------------------------
>
>                 Key: HARMONY-2138
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2138
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Tony Wu
>         Attachments: patch.diff
>
>
> this testcase passed on RI but failed on harmony.
>     
> public void testDeleteJarFileUsingURLConnection() throws Exception {
>         String jarFileName = "file.jar";
>         String entry = "text.txt";
>         File file = new File(jarFileName);
>         FileOutputStream jarFile = new FileOutputStream(jarFileName);
>         JarOutputStream out = new JarOutputStream(new BufferedOutputStream(
>                 jarFile));
>         JarEntry jarEntry = new JarEntry(entry);
>         out.putNextEntry(jarEntry);
>         out.write(new byte[] { 'a', 'b', 'c' });
>         out.close();
>         URL url = new URL("jar:file:" + jarFileName + "!/" + entry);
>         URLConnection conn = url.openConnection();
>         conn.setUseCaches(false);
>         InputStream is = conn.getInputStream();
>         is.close();
>         assertTrue(file.delete());
>     }

-- 
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