summaryrefslogtreecommitdiff
path: root/qadevOOo/runner/util/utils.java
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-10-20 15:48:52 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-10-20 21:18:37 +0100
commit19fb7c8b60c93e0fd56887a4f534c43b56abbd0b (patch)
tree5885671bc820d972a8ec91f1dc46af4c9c3d24b0 /qadevOOo/runner/util/utils.java
parentc6351a89533f61bea8866966d2076eff324d102f (diff)
coverity#1326177 Explicit null dereferenced
Change-Id: I3981037c8383aff65c8b78eb4752c11ddeffc8fd
Diffstat (limited to 'qadevOOo/runner/util/utils.java')
-rw-r--r--qadevOOo/runner/util/utils.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/qadevOOo/runner/util/utils.java b/qadevOOo/runner/util/utils.java
index 05b9852c70da..dc1b63c9c9bf 100644
--- a/qadevOOo/runner/util/utils.java
+++ b/qadevOOo/runner/util/utils.java
@@ -240,15 +240,13 @@ public class utils {
String settingPath = null;
try {
Object settings = msf.createInstance("com.sun.star.comp.framework.PathSettings");
- XPropertySet pthSettings = null;
try {
- pthSettings = (XPropertySet) AnyConverter.toObject(
+ XPropertySet pthSettings = (XPropertySet) AnyConverter.toObject(
new Type(XPropertySet.class), settings);
+ settingPath = (String) pthSettings.getPropertyValue(setting);
} catch (com.sun.star.lang.IllegalArgumentException iae) {
System.out.println("### couldn't get Office Settings");
}
- settingPath = (String) pthSettings.getPropertyValue(setting);
-
} catch (Exception e) {
System.out.println("Couldn't get string value for " + setting);
e.printStackTrace();
@@ -256,8 +254,6 @@ public class utils {
return settingPath;
}
-
-
/**
* This method returns the temp dicrectory of the user.
* Since Java 1.4 it is not possible to read environment variables. To workaround