Fix bug #46472 - Avoid NPE in HPSFPropertiesExtractor when no properties exist

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@732058 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2009-01-06 18:59:42 +00:00
parent c4362b17e2
commit 68e203d5e6
3 changed files with 9 additions and 5 deletions

View File

@ -37,6 +37,7 @@
<!-- Don't forget to update status.xml too! -->
<release version="3.5-beta5" date="2008-??-??">
<action dev="POI-DEVELOPERS" type="fix">46472 - Avoid NPE in HPSFPropertiesExtractor when no properties exist</action>
<action dev="POI-DEVELOPERS" type="fix">46479 - fixed bugs related to cached formula values and HSSFFormulaEvaluator.evaluateInCell()</action>
<action dev="POI-DEVELOPERS" type="add">45031 - added implementation for CHOOSE() function</action>
<action dev="POI-DEVELOPERS" type="fix">46361 - resolve licensing issues around the HDGF resource file, chunks_parse_cmds.tbl</action>

View File

@ -34,6 +34,7 @@
<!-- Don't forget to update changes.xml too! -->
<changes>
<release version="3.5-beta5" date="2008-??-??">
<action dev="POI-DEVELOPERS" type="fix">46472 - Avoid NPE in HPSFPropertiesExtractor when no properties exist</action>
<action dev="POI-DEVELOPERS" type="fix">46479 - fixed bugs related to cached formula values and HSSFFormulaEvaluator.evaluateInCell()</action>
<action dev="POI-DEVELOPERS" type="add">45031 - added implementation for CHOOSE() function</action>
<action dev="POI-DEVELOPERS" type="fix">46361 - resolve licensing issues around the HDGF resource file, chunks_parse_cmds.tbl</action>

View File

@ -56,11 +56,13 @@ public class HPSFPropertiesExtractor extends POITextExtractor {
// Now custom ones
CustomProperties cps = dsi.getCustomProperties();
Iterator keys = cps.keySet().iterator();
while(keys.hasNext()) {
String key = (String)keys.next();
String val = getPropertyValueText( cps.get(key) );
text.append(key + " = " + val + "\n");
if(cps != null) {
Iterator keys = cps.keySet().iterator();
while(keys.hasNext()) {
String key = (String)keys.next();
String val = getPropertyValueText( cps.get(key) );
text.append(key + " = " + val + "\n");
}
}
// All done