Bug 19134 - NullPointerException at hdf.extractor.Utils.convertBytesToShort
Summary: NullPointerException at hdf.extractor.Utils.convertBytesToShort
Status: RESOLVED WONTFIX
Alias: None
Product: POI
Classification: Unclassified
Component: HDF (show other bugs)
Version: unspecified
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-18 00:34 UTC by JMB
Modified: 2005-03-20 17:06 UTC (History)
0 users



Attachments
Word doc for testing nullpointer exception poi/hfd (198.00 KB, application/octet-stream)
2003-04-18 00:38 UTC, JMB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description JMB 2003-04-18 00:34:54 UTC
Hi,
Sometimes convertBytesToShort is called with a null-array it seems.

Sample code:
WordDocument wd = new WordDocument("d:/testme2.doc");
StringWriter sw = new StringWriter();
wd.writeAllText(sw);	
System.out.println(sw.toString());


Checking for a null-array and then returning a 0 seems to help.
I'll try to attach the document.


Regards,
Jeroen
Comment 1 JMB 2003-04-18 00:38:59 UTC
Created attachment 5885 [details]
Word doc for testing nullpointer exception poi/hfd
Comment 2 Andy Oliver 2003-07-24 16:17:23 UTC
Move to HWPF