]> source.dussan.org Git - poi.git/commitdiff
Fix bug #46472 - Avoid NPE in HPSFPropertiesExtractor when no properties exist
authorNick Burch <nick@apache.org>
Tue, 6 Jan 2009 18:59:42 +0000 (18:59 +0000)
committerNick Burch <nick@apache.org>
Tue, 6 Jan 2009 18:59:42 +0000 (18:59 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@732058 13f79535-47bb-0310-9956-ffa450edef68

src/documentation/content/xdocs/changes.xml
src/documentation/content/xdocs/status.xml
src/java/org/apache/poi/hpsf/extractor/HPSFPropertiesExtractor.java

index 05365074112eabcdac10736d9ca7150e9ed4b5ac..63002aae8da6e3fc6fd27174c5273bdd4f0e5829 100644 (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>
index 6e72711b7a07dd92baf96bf5599558be371b6e43..8878fce6f8cfb4483c3334ae15b1fe0853f78c49 100644 (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>
index ecad5c05bee8b403743bab2fbc523a8b0133ba97..ca1cfb46dd62a4ee8543645bd34a68bd7d357245 100644 (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