You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Ronald Brill (Jira)" <ji...@apache.org> on 2021/07/25 11:43:00 UTC

[jira] [Updated] (IO-744) FileWriterWithEncoding is not backward compatible to version 2.10.0

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

Ronald Brill updated IO-744:
----------------------------
    Description: 
Creating a new FileWriterWithEncoding for an existing file no longer truncates the file. This was the case in the versions before including 2.10.0.

Starting with 2.11.0 i'm facing issues with files containing my new content but still have the old one if the existing file was larger than the new content.

 

commit b2811e86 seems to introduce the problem - i think we should use StandardOpenOption.CREATE_NEW instead of StandardOpenOption.CREATE (inside the initWriter method)

 

Please give me a sign if you  need more details.

  was:
Creating a new FileWriterWithEncoding for an existing file no longer truncates the file. This was the case in the versions before including 2.10.0.

Starting with 2.11.0 i'm facing issues with files containing my new content but still have the old one if the existing file was larger than the new content.

 

commit b2811e86 seems to introduce the problem - i think we should use StandardOpenOption.CREATE_NEW instead of StandardOpenOption.CREATE.

 

Please give me a sign if you  need more details.


> FileWriterWithEncoding is not backward compatible to version 2.10.0
> -------------------------------------------------------------------
>
>                 Key: IO-744
>                 URL: https://issues.apache.org/jira/browse/IO-744
>             Project: Commons IO
>          Issue Type: Bug
>          Components: Streams/Writers
>    Affects Versions: 2.11.0
>            Reporter: Ronald Brill
>            Priority: Critical
>
> Creating a new FileWriterWithEncoding for an existing file no longer truncates the file. This was the case in the versions before including 2.10.0.
> Starting with 2.11.0 i'm facing issues with files containing my new content but still have the old one if the existing file was larger than the new content.
>  
> commit b2811e86 seems to introduce the problem - i think we should use StandardOpenOption.CREATE_NEW instead of StandardOpenOption.CREATE (inside the initWriter method)
>  
> Please give me a sign if you  need more details.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)