You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ta...@apache.org on 2016/02/25 18:34:55 UTC

tika git commit: TIKA-1874 fix small npe

Repository: tika
Updated Branches:
  refs/heads/2.x 18d028555 -> 5083cc11c


TIKA-1874 fix small npe


Project: http://git-wip-us.apache.org/repos/asf/tika/repo
Commit: http://git-wip-us.apache.org/repos/asf/tika/commit/5083cc11
Tree: http://git-wip-us.apache.org/repos/asf/tika/tree/5083cc11
Diff: http://git-wip-us.apache.org/repos/asf/tika/diff/5083cc11

Branch: refs/heads/2.x
Commit: 5083cc11c6230218ecef7d0161fa92bbf8d317e6
Parents: 18d0285
Author: tballison <ta...@mitre.org>
Authored: Thu Feb 25 12:34:45 2016 -0500
Committer: tballison <ta...@mitre.org>
Committed: Thu Feb 25 12:34:45 2016 -0500

----------------------------------------------------------------------
 .../org/apache/tika/parser/microsoft/ooxml/XWPFListManager.java   | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tika/blob/5083cc11/tika-parser-modules/tika-parser-office-module/src/main/java/org/apache/tika/parser/microsoft/ooxml/XWPFListManager.java
----------------------------------------------------------------------
diff --git a/tika-parser-modules/tika-parser-office-module/src/main/java/org/apache/tika/parser/microsoft/ooxml/XWPFListManager.java b/tika-parser-modules/tika-parser-office-module/src/main/java/org/apache/tika/parser/microsoft/ooxml/XWPFListManager.java
index 5654378..ffbb167 100644
--- a/tika-parser-modules/tika-parser-office-module/src/main/java/org/apache/tika/parser/microsoft/ooxml/XWPFListManager.java
+++ b/tika-parser-modules/tika-parser-office-module/src/main/java/org/apache/tika/parser/microsoft/ooxml/XWPFListManager.java
@@ -57,6 +57,9 @@ public class XWPFListManager extends AbstractListManager {
      * @return the formatted number or an empty string if something went wrong
      */
     public String getFormattedNumber(final XWPFParagraph paragraph) {
+        if (numbering == null) {
+            return "";
+        }
         int currNumId = paragraph.getNumID().intValue();
         XWPFNum xwpfNum = numbering.getNum(paragraph.getNumID());
         if (xwpfNum == null) {