[Libreoffice-commits] core.git: qadevOOo/tests

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Jul 26 10:58:40 UTC 2019


 qadevOOo/tests/java/mod/_dbaccess/OQueryDesign.java |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 436d30ed57cc9f6122137cdba30afe5935c8bb34
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Jul 26 08:58:08 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Jul 26 12:57:40 2019 +0200

    cid#1448530 RV: Bad use of return value
    
    Change-Id: Id84149b619b39d71bc8fb2d01774afd085245a0b
    Reviewed-on: https://gerrit.libreoffice.org/76357
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/qadevOOo/tests/java/mod/_dbaccess/OQueryDesign.java b/qadevOOo/tests/java/mod/_dbaccess/OQueryDesign.java
index 80f9b5b17c34..4ca3a43aa8dd 100644
--- a/qadevOOo/tests/java/mod/_dbaccess/OQueryDesign.java
+++ b/qadevOOo/tests/java/mod/_dbaccess/OQueryDesign.java
@@ -21,6 +21,8 @@ import com.sun.star.sdbc.XConnection;
 import com.sun.star.uno.Exception;
 import java.io.PrintWriter;
 
+import lib.Status;
+import lib.StatusException;
 import lib.TestCase;
 import lib.TestEnvironment;
 import lib.TestParameters;
@@ -190,7 +192,13 @@ public class OQueryDesign extends TestCase {
         XController xCont = UnoRuntime.queryInterface(XController.class, oQueryDesign);
 
         // marry them all
-        xCont.attachModel(xMod);
+        boolean bSuccess = xCont.attachModel(xMod);
+        if (!bSuccess)
+        {
+            throw new StatusException (Status.failed (
+            "Couldn't attach model"));
+        }
+
         xMod.connectController(xCont);
         xMod.setCurrentController(xCont);
 


More information about the Libreoffice-commits mailing list