Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.0.2 PDFBox
-
None
Description
As written by Anthony Brunellière on the dev mailing list:
The method PDDocument.save(..) (version 3.0.2) generates a warning if the output file already exists : {code:java} 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?