[Libreoffice-commits] core.git: qadevOOo/runner
Robert Antoni Buj i Gelonch
robert.buj at gmail.com
Wed Oct 1 13:07:05 PDT 2014
qadevOOo/runner/base/java_fat_service.java | 35 +++++++++++------------------
1 file changed, 14 insertions(+), 21 deletions(-)
New commits:
commit 58d07a1e9574c1ecdd09e924357caaebc82cac62
Author: Robert Antoni Buj i Gelonch <robert.buj at gmail.com>
Date: Wed Oct 1 21:12:34 2014 +0200
runner: Avoid a possible NullPointerException with tCase Object
Change-Id: Ie1202b7fa89306ea2a99031b9347b657039b839e
Reviewed-on: https://gerrit.libreoffice.org/11750
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
diff --git a/qadevOOo/runner/base/java_fat_service.java b/qadevOOo/runner/base/java_fat_service.java
index f9eefaa..27ae90a 100644
--- a/qadevOOo/runner/base/java_fat_service.java
+++ b/qadevOOo/runner/base/java_fat_service.java
@@ -217,32 +217,25 @@ public class java_fat_service implements TestBase {
log = (LogWriter)dcl.getInstance((String)param.get("LogWriter"));
param.getMSF();
- TestCase tCase = null;
+ TestEnvironment tEnv = null;
- try
- {
- tCase = (TestCase) dcl.getInstance("mod._"+entry.entryName);
- }
- catch (java.lang.IllegalArgumentException ie)
- {
+ try {
+ TestCase tCase = (TestCase) dcl.getInstance("mod._"+entry.entryName);
+ log.println("Creating: " + tCase.getObjectName());
+ log.initialize(entry, true);
+ entry.UserDefinedParams = param;
+ tCase.setLogWriter((PrintWriter) log);
+ try {
+ tCase.initializeTestCase(param);
+ tEnv = tCase.getTestEnvironment(param);
+ } catch (com.sun.star.lang.DisposedException de) {
+ log.println("Office disposed");
+ }
+ } catch (java.lang.IllegalArgumentException ie) {
entry.ErrorMsg=ie.getMessage();
entry.hasErrorMsg=true;
}
- log.println("Creating: "+tCase.getObjectName());
- log.initialize(entry,true);
- entry.UserDefinedParams = param;
- tCase.setLogWriter((PrintWriter) log);
- TestEnvironment tEnv = null;
- try
- {
- tCase.initializeTestCase(param);
- tEnv = tCase.getTestEnvironment(param);
- }
- catch (com.sun.star.lang.DisposedException de)
- {
- log.println("Office disposed");
- }
return tEnv;
}
More information about the Libreoffice-commits
mailing list