pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msahy...@apache.org
Subject svn commit: r1827328 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSeedValueCertificate.java
Date Tue, 20 Mar 2018 15:37:09 GMT
Author: msahyoun
Date: Tue Mar 20 15:37:08 2018
New Revision: 1827328

URL: http://svn.apache.org/viewvc?rev=1827328&view=rev
Log:
PDFBOX-4071: use StringBuilder to concatenate chars to string

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSeedValueCertificate.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSeedValueCertificate.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSeedValueCertificate.java?rev=1827328&r1=1827327&r2=1827328&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSeedValueCertificate.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSeedValueCertificate.java
Tue Mar 20 15:37:08 2018
@@ -447,9 +447,18 @@ public class PDSeedValueCertificate impl
             char dataEncipherment, char keyAgreement, char keyCertSign, char cRLSign,
             char encipherOnly, char decipherOnly)
     {
-        String string = "" + digitalSignature + nonRepudiation + keyEncipherment + dataEncipherment
-                + keyAgreement + keyCertSign + cRLSign + encipherOnly + decipherOnly;
-        addKeyUsage(string);
+        StringBuilder builder = new StringBuilder();
+        builder.append(digitalSignature);
+        builder.append(nonRepudiation);
+        builder.append(keyEncipherment);
+        builder.append(dataEncipherment);
+        builder.append(keyAgreement);
+        builder.append(keyCertSign);
+        builder.append(cRLSign);
+        builder.append(encipherOnly);
+        builder.append(decipherOnly);
+        
+        addKeyUsage(builder.toString());
     }
 
     /**



Mime
View raw message