[Libreoffice-commits] core.git: 3 commits - qadevOOo/runner qadevOOo/tests
Caolán McNamara
caolanm at redhat.com
Wed Jan 20 11:09:00 PST 2016
qadevOOo/runner/util/utils.java | 11 +-------
qadevOOo/tests/java/ifc/frame/_XDocumentTemplates.java | 21 ++++++++---------
2 files changed, 13 insertions(+), 19 deletions(-)
New commits:
commit 16255e485e0000985a139240a09c78a489e14786
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 20 17:36:52 2016 +0000
coverity#1326418 Dereference null return value
Change-Id: I5910518d0ae672232b00915a2437a5881dfa5f16
diff --git a/qadevOOo/tests/java/ifc/frame/_XDocumentTemplates.java b/qadevOOo/tests/java/ifc/frame/_XDocumentTemplates.java
index 2031ca3..60d5562 100644
--- a/qadevOOo/tests/java/ifc/frame/_XDocumentTemplates.java
+++ b/qadevOOo/tests/java/ifc/frame/_XDocumentTemplates.java
@@ -188,19 +188,20 @@ public class _XDocumentTemplates extends MultiMethodTest {
* Returns the string representation of content passed as parameter.
*/
protected String getContentList(XContent content) {
- XResultSet statRes = getStatResultSet(content);
StringBuilder ret = new StringBuilder();
- try {
- statRes.first();
- XRow row = UnoRuntime.queryInterface(XRow.class, statRes);
- while(! statRes.isAfterLast()) {
- ret.append("\n ").append(row.getString(1));
- statRes.next();
+ XResultSet statRes = getStatResultSet(content);
+ if (statRes != null) {
+ try {
+ statRes.first();
+ XRow row = UnoRuntime.queryInterface(XRow.class, statRes);
+ while(! statRes.isAfterLast()) {
+ ret.append("\n ").append(row.getString(1));
+ statRes.next();
+ }
+ } catch (com.sun.star.sdbc.SQLException e) {
+ log.println("Exception occurred:" + e);
}
- } catch (com.sun.star.sdbc.SQLException e) {
- log.println("Exception occurred:" + e);
}
-
return ret.toString();
}
commit 13b1c4a684b2c344660e1e9caaa4b4e667ca65a9
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 20 17:35:06 2016 +0000
coverity#1326388 Dereference null return value
Change-Id: Ifad565e1548a9564196bfcd7b77d81ebb97231f6
diff --git a/qadevOOo/runner/util/utils.java b/qadevOOo/runner/util/utils.java
index 914b066..c3f3458 100644
--- a/qadevOOo/runner/util/utils.java
+++ b/qadevOOo/runner/util/utils.java
@@ -203,15 +203,8 @@ public class utils {
*
*/
public static String getOfficeUserPath(XMultiServiceFactory msf) {
- String userPath = null;
-
// get a folder located in the user dir
- try {
- userPath = getOfficeSettingsValue(msf, "UserConfig");
- } catch (Exception e) {
- System.out.println("Couldn't get Office User Path");
- e.printStackTrace();
- }
+ String userPath = getOfficeSettingsValue(msf, "UserConfig");
// strip the returned folder to the user dir
if (userPath.charAt(userPath.length() - 1) == '/') {
commit 960acbfdee1bcd2053a84c95f1c7ed046d3ade23
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 20 17:33:49 2016 +0000
coverity#1326387 Dereference null return value
Change-Id: I150d3df8926a547b8ecf4324303dc4520ee2e899
diff --git a/qadevOOo/runner/util/utils.java b/qadevOOo/runner/util/utils.java
index 3acbb55..914b066 100644
--- a/qadevOOo/runner/util/utils.java
+++ b/qadevOOo/runner/util/utils.java
@@ -82,7 +82,7 @@ public class utils {
}
});
- if (list[0] != null) {
+ if (list != null && list[0] != null) {
String tDoc = srcRoot.concat(pthSep).concat(list[0]).concat(pthSep).concat("testdocs");
if (new File(tDoc).exists()) {
More information about the Libreoffice-commits
mailing list