You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2015/02/11 19:04:09 UTC

svn commit: r1659023 - /pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ExtractText.java

Author: tilman
Date: Wed Feb 11 18:04:09 2015
New Revision: 1659023

URL: http://svn.apache.org/r1659023
Log:
PDFBOX-2678: avoid NPE risk discovered by user "nullpointer"

Modified:
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ExtractText.java

Modified: pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ExtractText.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ExtractText.java?rev=1659023&r1=1659022&r2=1659023&view=diff
==============================================================================
--- pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ExtractText.java (original)
+++ pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ExtractText.java Wed Feb 11 18:04:09 2015
@@ -252,7 +252,7 @@ public class ExtractText
                                 }
                                 PDComplexFileSpecification spec = (PDComplexFileSpecification) ent.getValue();
                                 PDEmbeddedFile file = spec.getEmbeddedFile();
-                                if (file != null && file.getSubtype().equals("application/pdf"))
+                                if (file != null && "application/pdf".equals(file.getSubtype()))
                                 {
                                     if (debug)
                                     {