pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1863430 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFStreamParser.java
Date Fri, 19 Jul 2019 19:20:35 GMT
Author: tilman
Date: Fri Jul 19 19:20:35 2019
New Revision: 1863430

URL: http://svn.apache.org/viewvc?rev=1863430&view=rev
Log:
PDFBOX-4071: SonarQube fix

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFStreamParser.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFStreamParser.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFStreamParser.java?rev=1863430&r1=1863429&r2=1863430&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFStreamParser.java
(original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFStreamParser.java
Fri Jul 19 19:20:35 2019
@@ -304,8 +304,8 @@ public class PDFStreamParser extends Bas
             case 'I':
             {
                 //Special case for ID operator
-                String id = "" + (char) seqSource.read() + (char) seqSource.read();
-            if (!id.equals(OperatorName.BEGIN_INLINE_IMAGE_DATA))
+                String id = Character.toString((char) seqSource.read()) + (char) seqSource.read();
+                if (!id.equals(OperatorName.BEGIN_INLINE_IMAGE_DATA))
                 {
                     throw new IOException( "Error: Expected operator 'ID' actual='" + id
+
                                            "' at stream offset " + seqSource.getPosition());



Mime
View raw message