About close method of File

  • Devin Tan
    Devin Tan

    Hi all,
    I using PDF Clown to write some OCR text to the original existing PDF file, but sometimes some PDF file will leave over a .tmp file. My code like below.
    org.pdfclown.files.File file = new org.pdfclown.files.File(pdfFile);
    try {
    ......using PrimitiveComposer to write some text
    } finally {

    I read the source code, the save() method will save to a .tmp file, and the close() method will delete
    the original file and rename the .tmp file to it. it seems that the original file didn't delete successfully. Is this a bug or there is something wrong in my code?