summaryrefslogtreecommitdiff
path: root/qadevOOo
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-02-04 10:55:38 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-02-04 15:47:11 +0000
commit1a84fb8f92ea941214fc9d3a6773aabcfca865e2 (patch)
treec7d433882364864c6db4c458932b1cc298e39f6c /qadevOOo
parent02888887be860cbd9963e5c2853ddd18cc5ce6e9 (diff)
coverity#1326388 Dereference null return value
Change-Id: I08955a20e0566f56701bef85a4a9d4de79ca7b1f
Diffstat (limited to 'qadevOOo')
-rw-r--r--qadevOOo/runner/util/utils.java21
1 files changed, 5 insertions, 16 deletions
diff --git a/qadevOOo/runner/util/utils.java b/qadevOOo/runner/util/utils.java
index 8582f5f24010..4788e3eae689 100644
--- a/qadevOOo/runner/util/utils.java
+++ b/qadevOOo/runner/util/utils.java
@@ -193,10 +193,6 @@ public class utils {
return fulldocURL;
}
-
-
-
-
/**
*
* This method get's the user dir of the connected office
@@ -229,22 +225,15 @@ public class utils {
* @return the value as String
*/
private static String getOfficeSettingsValue(XMultiServiceFactory msf, String setting) {
-
- String settingPath = null;
try {
Object settings = msf.createInstance("com.sun.star.comp.framework.PathSettings");
- try {
- 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");
- }
- } catch (Exception e) {
- System.out.println("Couldn't get string value for " + setting);
+ XPropertySet pthSettings = (XPropertySet) AnyConverter.toObject(
+ new Type(XPropertySet.class), settings);
+ return (String) pthSettings.getPropertyValue(setting);
+ } catch (com.sun.star.uno.Exception e) {
e.printStackTrace();
+ throw new RuntimeException(e);
}
- return settingPath;
}
/**