commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yu Zhang (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IO-485) org.apache.commons.io.output.LockableFileWriter#append() would override rather than append when two instance invoke this method to a same file.
Date Wed, 19 Aug 2015 07:59:46 GMT
Yu Zhang created IO-485:
---------------------------

             Summary: org.apache.commons.io.output.LockableFileWriter#append() would override
rather than append when two instance invoke this method to a same file.
                 Key: IO-485
                 URL: https://issues.apache.org/jira/browse/IO-485
             Project: Commons IO
          Issue Type: Bug
          Components: Streams/Writers
    Affects Versions: 2.4
         Environment: Mac OSX
            Reporter: Yu Zhang


LockableFileWriter fw0 = new LockableFileWriter("/tmp/push_failure.log");
        fw0.append("hello,\n");
        fw0.flush();
        fw0.close();

LockableFileWriter fw1 = new LockableFileWriter("/tmp/push_failure.log");
        fw1.append("world.");
        fw1.flush();
        fw1.close();

then the file's content is "world."



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message