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

Caolán McNamara caolanm at redhat.com
Thu Oct 15 06:30:26 PDT 2015


 qadevOOo/tests/java/ifc/frame/_XFramesSupplier.java |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

New commits:
commit ad05955de0710a2b76fe6423d37a0a58243f1355
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Oct 15 14:26:44 2015 +0100

    coverity#1326276 Explicit null dereferenced
    
    Change-Id: Iec9b5cbb50385e30d1fe8cda0a24285da5e15506

diff --git a/qadevOOo/tests/java/ifc/frame/_XFramesSupplier.java b/qadevOOo/tests/java/ifc/frame/_XFramesSupplier.java
index 64997de..a54718b 100644
--- a/qadevOOo/tests/java/ifc/frame/_XFramesSupplier.java
+++ b/qadevOOo/tests/java/ifc/frame/_XFramesSupplier.java
@@ -149,7 +149,6 @@ public class _XFramesSupplier extends MultiMethodTest {
     * </ul>
     */
     public void _setActiveFrame() {
-        boolean result = true ;
         XFrame sFrame = null ;
 
         requiredMethod("getActiveFrame()") ;
@@ -184,9 +183,16 @@ public class _XFramesSupplier extends MultiMethodTest {
 
         oObj.setActiveFrame(sFrame) ;
         XFrame gFrame = oObj.getActiveFrame() ;
-        if (!(gFrame == null && sFrame == null
-              || sFrame.equals(gFrame))) {
 
+        boolean result;
+        if (gFrame == null && sFrame == null)
+            result = true;
+        else if (gFrame != null && sFrame != null)
+            result = sFrame.equals(gFrame);
+        else
+            result = false;
+
+        if (!result) {
             log.println("Active frame set is not equal frame get: FAILED");
             result = false ;
         }


More information about the Libreoffice-commits mailing list