Makes sense IMHO!
Tilman
On 25.04.2024 11:34, BRUNELLIERE Anthony wrote:
Hello,
I ask you this question before creating a JIRA.
The method PDDocument.save(..) (version 3.0.2) generates a warning if the
output file already exists :
[...]
public void save(File file, CompressParameters compressParameters) throws
IOException
{
if (file.exists())
{
LOG.warn(
"You are overwriting the existing file " + file.getName()
+ ", this will produce a corrupted file if you're also
reading from it");
}
[...]
I understand the disclaimer "Don't use the input file as target as this will produce
a corrupted file", but I'm in a context where an empty ouput file is created just
before for specific reasons.
Should this warning be limited to non-empty files?
Thank you in advance for your feedback
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]