Author: yegor
Date: Fri Nov 16 12:58:45 2012
New Revision: 1410324

URL: http://svn.apache.org/viewvc?rev=1410324&view=rev
Log:
avoid warning: check if property node exists instead of throw/catch exception

Modified:
    poi/trunk/src/java/org/apache/poi/POIDocument.java

Modified: poi/trunk/src/java/org/apache/poi/POIDocument.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/POIDocument.java?rev=1410324&r1=1410323&r2=1410324&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/POIDocument.java (original)
+++ poi/trunk/src/java/org/apache/poi/POIDocument.java Fri Nov 16 12:58:45 2012
@@ -148,7 +148,7 @@ public abstract class POIDocument {
         */
        protected PropertySet getPropertySet(String setName) {
           //directory can be null when creating new documents
-          if(directory == null) return null;
+          if(directory == null || !directory.hasEntry(setName)) return null;
 
           DocumentInputStream dis;
           try {



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to