pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1647690 - /pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/CreateSignature.java
Date Tue, 23 Dec 2014 22:50:01 GMT
Author: tilman
Date: Tue Dec 23 22:50:01 2014
New Revision: 1647690

URL: http://svn.apache.org/r1647690
Log:
PDFBOX-2576: String.indexOf(char) is faster than String.indexOf(String)

Modified:
    pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/CreateSignature.java

Modified: pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/CreateSignature.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/CreateSignature.java?rev=1647690&r1=1647689&r2=1647690&view=diff
==============================================================================
--- pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/CreateSignature.java
(original)
+++ pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/CreateSignature.java
Tue Dec 23 22:50:01 2014
@@ -352,7 +352,7 @@ public class CreateSignature implements
 
         File inFile = new File(args[2]);
         String name = inFile.getName();
-        String substring = name.substring(0, name.lastIndexOf("."));
+        String substring = name.substring(0, name.lastIndexOf('.'));
 
         File outFile = new File(inFile.getParent(), substring + "_signed.pdf");
         signing.signDetached(inFile, outFile, tsaClient);



Mime
View raw message