Kaydet (Commit) 19fb7c8b authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1326177 Explicit null dereferenced

Change-Id: I3981037c8383aff65c8b78eb4752c11ddeffc8fd
üst c6351a89
...@@ -240,15 +240,13 @@ public class utils { ...@@ -240,15 +240,13 @@ public class utils {
String settingPath = null; String settingPath = null;
try { try {
Object settings = msf.createInstance("com.sun.star.comp.framework.PathSettings"); Object settings = msf.createInstance("com.sun.star.comp.framework.PathSettings");
XPropertySet pthSettings = null;
try { try {
pthSettings = (XPropertySet) AnyConverter.toObject( XPropertySet pthSettings = (XPropertySet) AnyConverter.toObject(
new Type(XPropertySet.class), settings); new Type(XPropertySet.class), settings);
settingPath = (String) pthSettings.getPropertyValue(setting);
} catch (com.sun.star.lang.IllegalArgumentException iae) { } catch (com.sun.star.lang.IllegalArgumentException iae) {
System.out.println("### couldn't get Office Settings"); System.out.println("### couldn't get Office Settings");
} }
settingPath = (String) pthSettings.getPropertyValue(setting);
} catch (Exception e) { } catch (Exception e) {
System.out.println("Couldn't get string value for " + setting); System.out.println("Couldn't get string value for " + setting);
e.printStackTrace(); e.printStackTrace();
...@@ -256,8 +254,6 @@ public class utils { ...@@ -256,8 +254,6 @@ public class utils {
return settingPath; return settingPath;
} }
/** /**
* This method returns the temp dicrectory of the user. * This method returns the temp dicrectory of the user.
* Since Java 1.4 it is not possible to read environment variables. To workaround * Since Java 1.4 it is not possible to read environment variables. To workaround
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment