From b73db446ac9681fdfc4ad602c6da7ce3e36a8588 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 5 Nov 2015 14:16:35 +0200 Subject: java: combine nested if statements Change-Id: I0457b81668e9427a3c8d6a4af93438b7fb2bb7ba --- .../star/comp/helper/SharedLibraryLoader_Test.java | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'javaunohelper/test') diff --git a/javaunohelper/test/com/sun/star/comp/helper/SharedLibraryLoader_Test.java b/javaunohelper/test/com/sun/star/comp/helper/SharedLibraryLoader_Test.java index 550a497018dc..b9c67e68be74 100644 --- a/javaunohelper/test/com/sun/star/comp/helper/SharedLibraryLoader_Test.java +++ b/javaunohelper/test/com/sun/star/comp/helper/SharedLibraryLoader_Test.java @@ -61,9 +61,8 @@ public class SharedLibraryLoader_Test { sharedLibraryLoader = null; System.out.println("*******************************************************************"); System.out.println("Test: <<< instantiate SharedLibraryLoader >>>"); - if ( sharedLibraryLoaderFactory == null ) - if ( ! test_getSharedLibraryLoaderFactory() ) - return false; + if ( sharedLibraryLoaderFactory == null && ! test_getSharedLibraryLoaderFactory() ) + return false; sharedLibraryLoader = UnoRuntime.queryInterface( XImplementationLoader.class, sharedLibraryLoaderFactory.createInstance() ); @@ -83,9 +82,8 @@ public class SharedLibraryLoader_Test { System.out.println("*******************************************************************"); System.out.println("Test: <<< load native ServiceManager >>>"); - if ( sharedLibraryLoader == null ) - if ( ! test_instantiateSharedLibraryLoader() ) - return false; + if ( sharedLibraryLoader == null && ! test_instantiateSharedLibraryLoader() ) + return false; System.err.println("- get the native ServiceManger factory"); XSingleServiceFactory aSMgrFac = @@ -108,9 +106,8 @@ public class SharedLibraryLoader_Test { { System.out.println("*******************************************************************"); System.out.println("Test: <<< load native SimpleRegistry >>>"); - if ( sharedLibraryLoader == null ) - if ( ! test_instantiateSharedLibraryLoader() ) - return false; + if ( sharedLibraryLoader == null && ! test_instantiateSharedLibraryLoader() ) + return false; System.err.println("- get factory of the Registry"); XSingleServiceFactory aRegFac = @@ -134,9 +131,8 @@ public class SharedLibraryLoader_Test { System.out.println("*******************************************************************"); System.out.println("Test: <<< register SharedLibraryLoader at the Registry >>>"); - if ( simpleRegistry == null ) - if ( ! test_loadNativeSimpleRegistry() ) - return false; + if ( simpleRegistry == null && ! test_loadNativeSimpleRegistry() ) + return false; com.sun.star.registry.XRegistryKey regKey = simpleRegistry.getRootKey(); result = SharedLibraryLoader.writeRegistryServiceInfo( null, regKey ); -- cgit