pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1630523 - /pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/cos/COSString.java
Date Thu, 09 Oct 2014 16:08:54 GMT
Author: tilman
Date: Thu Oct  9 16:08:54 2014
New Revision: 1630523

URL: http://svn.apache.org/r1630523
Log:
PDFBOX-2401: revert previous commit, as the real error cause is in PDFDocEncodingCharset

Modified:
    pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/cos/COSString.java

Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/cos/COSString.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/cos/COSString.java?rev=1630523&r1=1630522&r2=1630523&view=diff
==============================================================================
--- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/cos/COSString.java (original)
+++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/cos/COSString.java Thu Oct
 9 16:08:54 2014
@@ -22,7 +22,6 @@ import java.io.OutputStream;
 import java.nio.ByteBuffer;
 import java.nio.CharBuffer;
 import java.nio.charset.Charset;
-import java.util.Arrays;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -482,9 +481,7 @@ public class COSString extends COSBase
         if (obj instanceof COSString)
         {
             COSString strObj = (COSString) obj;
-            // Workaround because different String objects with 
-            // 0x00 and 0xFF content are equal in java?!
-            return Arrays.equals(this.getBytes(), strObj.getBytes()) && this.forceHexForm
== strObj.forceHexForm;
+            return this.getString().equals(strObj.getString()) && forceHexForm ==
strObj.forceHexForm;
         }
         return false;
     }



Mime
View raw message