https://issues.apache.org/bugzilla/show_bug.cgi?id=51974
Bug #: 51974
Summary: [PATCH] TIKA spawned Picture.suggestPictureType() -
NullPointerException
Product: POI
Version: 3.8-dev
Platform: PC
OS/Version: All
Status: NEW
Severity: blocker
Priority: P2
Component: HWPF
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Depends on: 51902
Classification: Unclassified
Created attachment 27705
--> https://issues.apache.org/bugzilla/attachment.cgi?id=27705
Resolves null pointer issue in new picture logic
+++ This bug may have been introduced by fixes submitted last weekend that
resolved Bug #51902 +++
**Effects Daily Build**
Essentially the new Picture related fixes can now encounter NULL pointer
Exceptions in two places when doing extraction with TIKA that were not an issue
for documents prior to the fixes.
The resolution is rather simple, just adding a couple null checks in two
places, in getRawContent() and suggestPictureType()
The patch file for the daily build is attached.
Stack Trace (Daily build 10/05/2011 both POI and TIKA)
-------------------------------------------------
Caused by: java.lang.NullPointerException
at
org.apache.poi.hwpf.usermodel.Picture.suggestPictureType(Picture.java:519)
at
org.apache.poi.hwpf.usermodel.Picture.suggestFileExtension(Picture.java:500)
at
org.apache.poi.hwpf.usermodel.Picture.suggestFullFileName(Picture.java:512)
at
org.apache.tika.parser.microsoft.WordExtractor$PicturesSource.<init>(WordExtractor.java:520)
at
org.apache.tika.parser.microsoft.WordExtractor$PicturesSource.<init>(WordExtractor.java:504)
at
org.apache.tika.parser.microsoft.WordExtractor.parse(WordExtractor.java:85)
at
org.apache.tika.parser.microsoft.OfficeParser.parse(OfficeParser.java:200)
at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:242)
... 46 more
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]