pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1792115 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSName.java
Date Thu, 20 Apr 2017 19:04:32 GMT
Author: tilman
Date: Thu Apr 20 19:04:32 2017
New Revision: 1792115

URL: http://svn.apache.org/viewvc?rev=1792115&view=rev
Log:
PDFBOX-2852: simplify code

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSName.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSName.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSName.java?rev=1792115&r1=1792114&r2=1792115&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSName.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSName.java Thu Apr 20 19:04:32
2017
@@ -685,7 +685,7 @@ public final class COSName extends COSBa
         byte[] bytes = getName().getBytes(Charsets.US_ASCII);
         for (byte b : bytes)
         {
-            int current = (b + 256) % 256;
+            int current = b & 0xFF;
 
             // be more restrictive than the PDF spec, "Name Objects", see PDFBOX-2073
             if (current >= 'A' && current <= 'Z' ||



Mime
View raw message