poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ye...@apache.org
Subject svn commit: r1410324 - /poi/trunk/src/java/org/apache/poi/POIDocument.java
Date Fri, 16 Nov 2012 12:58:46 GMT
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: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message