summaryrefslogtreecommitdiff
path: root/qadevOOo
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 /qadevOOo
parentdfcb982ae8810e22204bc15fd7c119a903900a53 (diff)
java: combine nested if statements
Change-Id: I0457b81668e9427a3c8d6a4af93438b7fb2bb7ba
Diffstat (limited to 'qadevOOo')
-rw-r--r--qadevOOo/runner/helper/ProcessHandler.java11
-rw-r--r--qadevOOo/tests/java/ifc/beans/_XTolerantMultiPropertySet.java5
-rw-r--r--qadevOOo/tests/java/ifc/view/_XMultiSelectionSupplier.java20
-rw-r--r--qadevOOo/tests/java/ifc/view/_XSelectionSupplier.java10
4 files changed, 18 insertions, 28 deletions
diff --git a/qadevOOo/runner/helper/ProcessHandler.java b/qadevOOo/runner/helper/ProcessHandler.java
index 999a0097fd8e..607c1f21a2c2 100644
--- a/qadevOOo/runner/helper/ProcessHandler.java
+++ b/qadevOOo/runner/helper/ProcessHandler.java
@@ -509,14 +509,11 @@ public class ProcessHandler
}
}
- if (bKillProcessAfterTimeout)
+ if (bKillProcessAfterTimeout && !isFinished)
{
- if (!isFinished)
- {
- log.println("Going to destroy the process!!");
- m_aProcess.destroy();
- log.println("Process has been destroyed!");
- }
+ log.println("Going to destroy the process!!");
+ m_aProcess.destroy();
+ log.println("Process has been destroyed!");
}
return isFinished();
diff --git a/qadevOOo/tests/java/ifc/beans/_XTolerantMultiPropertySet.java b/qadevOOo/tests/java/ifc/beans/_XTolerantMultiPropertySet.java
index 8b5bb5c0b4c8..3f08e3e6a9a8 100644
--- a/qadevOOo/tests/java/ifc/beans/_XTolerantMultiPropertySet.java
+++ b/qadevOOo/tests/java/ifc/beans/_XTolerantMultiPropertySet.java
@@ -237,9 +237,8 @@ public class _XTolerantMultiPropertySet extends MultiMethodTest {
try {
PropertyState state = pState.getPropertyState(pName);
- if (state.equals(PropertyState.DIRECT_VALUE)) {
- if (isUsable(pName)) direct.add(pName);
- }
+ if (state.equals(PropertyState.DIRECT_VALUE) && isUsable(pName))
+ direct.add(pName);
} catch (com.sun.star.beans.UnknownPropertyException e) {
log.println("Property '" + pName + "'");
}
diff --git a/qadevOOo/tests/java/ifc/view/_XMultiSelectionSupplier.java b/qadevOOo/tests/java/ifc/view/_XMultiSelectionSupplier.java
index afc10f138b85..ebd7226c0415 100644
--- a/qadevOOo/tests/java/ifc/view/_XMultiSelectionSupplier.java
+++ b/qadevOOo/tests/java/ifc/view/_XMultiSelectionSupplier.java
@@ -326,12 +326,10 @@ public class _XMultiSelectionSupplier extends MultiMethodTest {
log.println("nextElement()-object and expected object 'selections["+i+"]' are equal: "+compRes);
- if (!compRes) {
- if ((selections[i]) instanceof Object[]){
- if (((Object[])selections[i])[0] instanceof Integer) {
- log.println("Getting: "+((Integer) ((Object[])shouldElement)[0]).intValue());
- log.println("Expected: "+((Integer) ((Object[])selections[i])[0]).intValue());
- }
+ if (!compRes && (selections[i]) instanceof Object[]) {
+ if (((Object[])selections[i])[0] instanceof Integer) {
+ log.println("Getting: "+((Integer) ((Object[])shouldElement)[0]).intValue());
+ log.println("Expected: "+((Integer) ((Object[])selections[i])[0]).intValue());
}
}
bOK &= compRes;
@@ -399,12 +397,10 @@ public class _XMultiSelectionSupplier extends MultiMethodTest {
log.println("nextElement()-object and expected object 'selections["+i+"]' are equal: "+compRes);
- if (!compRes) {
- if ((selections[i]) instanceof Object[]){
- if (((Object[])selections[i])[0] instanceof Integer) {
- log.println("Getting: "+((Integer) ((Object[])shouldElement)[0]).intValue());
- log.println("Expected: "+((Integer) ((Object[])selections[i])[0]).intValue());
- }
+ if (!compRes && (selections[i]) instanceof Object[]){
+ if (((Object[])selections[i])[0] instanceof Integer) {
+ log.println("Getting: "+((Integer) ((Object[])shouldElement)[0]).intValue());
+ log.println("Expected: "+((Integer) ((Object[])selections[i])[0]).intValue());
}
}
bOK &= compRes;
diff --git a/qadevOOo/tests/java/ifc/view/_XSelectionSupplier.java b/qadevOOo/tests/java/ifc/view/_XSelectionSupplier.java
index d601f1f2251b..c0059c718758 100644
--- a/qadevOOo/tests/java/ifc/view/_XSelectionSupplier.java
+++ b/qadevOOo/tests/java/ifc/view/_XSelectionSupplier.java
@@ -128,12 +128,10 @@ public class _XSelectionSupplier extends MultiMethodTest {
compRes = util.ValueComparer.equalValue(selections[i], curSelection);
}
log.println("selected object and current selection are equal: "+compRes);
- if (!compRes) {
- if ((selections[i]) instanceof Object[]){
- if (((Object[])selections[i])[0] instanceof Integer) {
- log.println("Getting: "+((Integer) ((Object[])curSelection)[0]).intValue());
- log.println("Expected: "+((Integer) ((Object[])selections[i])[0]).intValue());
- }
+ if (!compRes && (selections[i]) instanceof Object[]){
+ if (((Object[])selections[i])[0] instanceof Integer) {
+ log.println("Getting: "+((Integer) ((Object[])curSelection)[0]).intValue());
+ log.println("Expected: "+((Integer) ((Object[])selections[i])[0]).intValue());
}
}
res &= compRes;