[
https://issues.apache.org/jira/browse/IO-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13417938#comment-13417938
]
Sebb edited comment on IO-338 at 4/17/13 2:15 AM:
--------------------------------------------------
What error did you get before you swapped IOUtils.closeQuietly for the inline
code?
I see now: when an active file is renamed, the reader RAF still points to the
original file, but operations on the File variable will use the new file.
(Luckily File#length() returns 0 if the file does not exist, so the code should
not mind if it catches the window between rename and creation of the new file.)
Why does the patch set last = 0?
was (Author: [email protected]):
What error did you get before you swapped IOUtils.closeQuietly for the
inline code?
I see now: when an active file is renamed, the reader RAF still points to the
original file, but operations on the File variable will use the new file.
[Luckily File#length() returns 0 if the file does not exist, so the code should
not mind if it catches the window between rename and creation of the new file.]
Why does the patch set last = 0?
> When a file is rotated, finish reading previous file prior to starting new one
> ------------------------------------------------------------------------------
>
> Key: IO-338
> URL: https://issues.apache.org/jira/browse/IO-338
> Project: Commons IO
> Issue Type: Improvement
> Components: Utilities
> Reporter: Jonathan Creasy
> Attachments: IO-338-trunk.patch
>
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira