diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-10-15 13:00:47 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-15 14:26:06 +0100 |
commit | f1e4e73dfc55ab5a2d2e53b9e64bb012dedf5873 (patch) | |
tree | 1582ff832da450419d1a5d7ec1e6ec45f2b7c606 /scripting | |
parent | 9fd8c18948dda3559f01073996804a5ab66b34e1 (diff) |
coverity#1326238 Explicit null dereferenced
Change-Id: Id02dcf1a1fac22eae0a2e01596521eefee9ecbf3
Diffstat (limited to 'scripting')
-rw-r--r-- | scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java b/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java index 71535e1127ec..abe00e1a5f99 100644 --- a/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java +++ b/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java @@ -20,7 +20,10 @@ package com.sun.star.script.framework.browse; import com.sun.star.beans.XIntrospectionAccess; +import com.sun.star.container.NoSuchElementException; + import com.sun.star.lang.XMultiComponentFactory; +import com.sun.star.lang.WrappedTargetException; import com.sun.star.lib.uno.helper.PropertySet; @@ -62,19 +65,14 @@ public class ParcelBrowseNode extends PropertySet implements public boolean renamable = true; public ParcelBrowseNode(ScriptProvider provider, ParcelContainer container, - String parcelName) { + String parcelName) throws + com.sun.star.container.NoSuchElementException, + com.sun.star.lang.WrappedTargetException { this.provider = provider; this.container = container; - // TODO decide whether exception is propagated out or not - try { - this.parcel = (Parcel)this.container.getByName(parcelName); - } catch (Exception e) { - LogUtils.DEBUG("** Exception: " + e); - LogUtils.DEBUG(" ** Failed to get parcel named " + parcelName + - " from container"); - } + this.parcel = (Parcel)this.container.getByName(parcelName); registerProperty("Deletable", new Type(boolean.class), (short)0, "deletable"); registerProperty("Editable", new Type(boolean.class), (short)0, "editable"); @@ -314,4 +312,4 @@ public class ParcelBrowseNode extends PropertySet implements public boolean hasProperty(String aName) { return false; } -}
\ No newline at end of file +} |