You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Richard Liang (JIRA)" <ji...@apache.org> on 2007/02/12 05:21:06 UTC

[jira] Resolved: (HARMONY-1494) [classlib][luni] FileDescriptor.sync() throws unexpected SyncFailedException when the descriptor is read-only.

     [ https://issues.apache.org/jira/browse/HARMONY-1494?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard Liang resolved HARMONY-1494.
------------------------------------

    Resolution: Fixed

Hello Ruth,

The patch has been committed at revision r506271, thanks a lot for this enhancement.

Andrew, please verify this issue is fixed as you expected.

Best regards,
Richard

> [classlib][luni] FileDescriptor.sync() throws unexpected SyncFailedException when the descriptor is read-only.
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1494
>                 URL: https://issues.apache.org/jira/browse/HARMONY-1494
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Andrew Zhang
>         Assigned To: Richard Liang
>         Attachments: Harmony-1494-2.diff, Harmony-1494.diff
>
>
> Following test case reproduces the bug:
>     public void testSyncReadOnly() throws Exception {
>         String TESTFILE = "tempFile";
>         try {
>             FileOutputStream fos = new FileOutputStream(TESTFILE);
>             fos.write("something".getBytes());
>             fos.close();
>             RandomAccessFile raf = new RandomAccessFile(TESTFILE, "rw");
>             raf.getFD().sync();
>             raf.close();
>             FileInputStream fis = new FileInputStream(TESTFILE);
>             fis.getFD().sync();
>             fis.close();
>         } finally {
>             new File(TESTFILE).delete();
>         }
>     }
> The test passes against RI while fails against Harmony. I'll try to fix this problem. 
> Best regards,
> Andrew

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.