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 2017/08/01 20:09:11 UTC
svn commit: r1803697 -
/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/BaseParser.java
Author: tilman
Date: Tue Aug 1 20:09:11 2017
New Revision: 1803697
URL: http://svn.apache.org/viewvc?rev=1803697&view=rev
Log:
PDFBOX-2852: remove unneeded nullcheck; improve javadoc
Modified:
pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/BaseParser.java
Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/BaseParser.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/BaseParser.java?rev=1803697&r1=1803696&r2=1803697&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/BaseParser.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/BaseParser.java Tue Aug 1 20:09:11 2017
@@ -952,7 +952,7 @@ public abstract class BaseParser
//so we are more compatible with POS writers that don't
//follow the spec
String badString = readString();
- if( badString == null || badString.length() == 0 )
+ if (badString.isEmpty())
{
int peek = seqSource.peek();
// we can end up in an infinite loop otherwise
@@ -975,7 +975,7 @@ public abstract class BaseParser
/**
* This will read the next string from the stream.
*
- * @return The string that was read from the stream.
+ * @return The string that was read from the stream, never null.
*
* @throws IOException If there is an error reading from the stream.
*/