From c7c321b0f19bd0144f89aa92fa88b5b23b0b7dbb Mon Sep 17 00:00:00 2001 From: Yegor Kozlov Date: Fri, 16 Nov 2012 12:58:45 +0000 Subject: [PATCH] avoid warning: check if property node exists instead of throw/catch exception git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1410324 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/poi/POIDocument.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/java/org/apache/poi/POIDocument.java b/src/java/org/apache/poi/POIDocument.java index 8f177fec9..8f5c0aa3b 100644 --- a/src/java/org/apache/poi/POIDocument.java +++ b/src/java/org/apache/poi/POIDocument.java @@ -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 {