Uploaded image for project: 'Commons IO'
  1. Commons IO
  2. IO-485

org.apache.commons.io.output.LockableFileWriter#append() overwrites rather than appends when two instance invoke this method to a same file.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 2.4
    • None
    • Streams/Writers
    • Mac OSX, jdk1.8

    Description

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

      Attachments

        Activity

          People

            Unassigned Unassigned
            PixyOnly Yu Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 72h
                72h
                Remaining:
                Remaining Estimate - 72h
                72h
                Logged:
                Time Spent - Not Specified
                Not Specified