coverity#1326238 Explicit null dereferenced

Change-Id: Id02dcf1a1fac22eae0a2e01596521eefee9ecbf3
This commit is contained in:
Caolán McNamara
2015-10-15 13:00:47 +01:00
parent 9fd8c18948
commit f1e4e73dfc

View File

@@ -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;
}
}
}