From 436d30ed57cc9f6122137cdba30afe5935c8bb34 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 26 Jul 2019 08:58:08 +0100 Subject: cid#1448530 RV: Bad use of return value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Id84149b619b39d71bc8fb2d01774afd085245a0b Reviewed-on: https://gerrit.libreoffice.org/76357 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- qadevOOo/tests/java/mod/_dbaccess/OQueryDesign.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'qadevOOo') 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); -- cgit