pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1868714 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/io/ScratchFile.java
Date Mon, 21 Oct 2019 17:29:15 GMT
Author: tilman
Date: Mon Oct 21 17:29:15 2019
New Revision: 1868714

URL: http://svn.apache.org/viewvc?rev=1868714&view=rev
Log:
PDFBOX-4601: don't need to call file.length(), this is not needed as shown in log in issue
(raf.length() is enough), and is very slow on W10 as shown by Esteban Ruiz

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/io/ScratchFile.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/io/ScratchFile.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/io/ScratchFile.java?rev=1868714&r1=1868713&r2=1868714&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/io/ScratchFile.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/io/ScratchFile.java Mon Oct
21 17:29:15 2019
@@ -255,7 +255,7 @@ public class ScratchFile implements Clos
                         LOG.debug("fileLen after1: " + fileLen + ", raf length: " + raf.length()
+ 
                                   ", file length: " + file.length());
                     }
-                    if (fileLen != raf.length() || fileLen != file.length())
+                    if (fileLen != raf.length())
                     {
                         // PDFBOX-4601 possible AWS lambda bug that setLength() doesn't throw
                         // if not enough space



Mime
View raw message