summaryrefslogtreecommitdiff
path: root/javaunohelper
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-11-05 14:16:35 +0200
committerNoel Grandin <noel@peralex.com>2015-11-05 14:55:15 +0200
commitb73db446ac9681fdfc4ad602c6da7ce3e36a8588 (patch)
tree6107f4347c188f4c14840c01167b2f05b2f5ad48 /javaunohelper
parentdfcb982ae8810e22204bc15fd7c119a903900a53 (diff)
java: combine nested if statements
Change-Id: I0457b81668e9427a3c8d6a4af93438b7fb2bb7ba
Diffstat (limited to 'javaunohelper')
-rw-r--r--javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java9
-rw-r--r--javaunohelper/test/com/sun/star/comp/helper/SharedLibraryLoader_Test.java20
2 files changed, 11 insertions, 18 deletions
diff --git a/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java b/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java
index a61edc06acc8..e0fa1456e817 100644
--- a/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java
+++ b/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java
@@ -569,13 +569,10 @@ public class InterfaceContainer implements Cloneable
while (itColl.hasNext())
{
Object o= itColl.next();
- if (o != null)
+ if (o != null && UnoRuntime.areSame(o, curElem))
{
- if (UnoRuntime.areSame(o, curElem))
- {
- bExists= true;
- break;
- }
+ bExists= true;
+ break;
}
}
}
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 );