summaryrefslogtreecommitdiff
path: root/qadevOOo
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-05-02 15:42:25 +0200
committerNoel Grandin <noel@peralex.com>2014-05-05 12:47:48 +0200
commit4f9b21248ffdf55cef9f3f9d1da76778ee000775 (patch)
treeb059d288339a68aa4c3901f1100e99b04d05a23d /qadevOOo
parentb4107411900f5bb4c215e2d9db09fc2b2b82939b (diff)
simplify ternary conditions "xxx ? yyy : false"
Look for code like: xxx ? yyy : false; Which can be simplified to: xxx && yyy Change-Id: Ia33c0e452aa28af3f0658a5382895aaad0246b4d
Diffstat (limited to 'qadevOOo')
-rw-r--r--qadevOOo/runner/complexlib/Assurance.java2
-rw-r--r--qadevOOo/runner/convwatch/IniFile.java2
-rw-r--r--qadevOOo/runner/convwatch/OfficePrint.java2
-rw-r--r--qadevOOo/runner/graphical/IniFile.java2
-rw-r--r--qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java2
5 files changed, 5 insertions, 5 deletions
diff --git a/qadevOOo/runner/complexlib/Assurance.java b/qadevOOo/runner/complexlib/Assurance.java
index 0a43aae6b1c9..41f7ae4ffc4c 100644
--- a/qadevOOo/runner/complexlib/Assurance.java
+++ b/qadevOOo/runner/complexlib/Assurance.java
@@ -263,7 +263,7 @@ public class Assurance
boolean noExceptionAllowed = ( _expectedExceptionClass == null );
- boolean caughtExpected = noExceptionAllowed ? true : false;
+ boolean caughtExpected = noExceptionAllowed;
try
{
Method method = objectClass.getMethod( _methodName, _argClasses );
diff --git a/qadevOOo/runner/convwatch/IniFile.java b/qadevOOo/runner/convwatch/IniFile.java
index fc870d08b7c6..649341ecf45e 100644
--- a/qadevOOo/runner/convwatch/IniFile.java
+++ b/qadevOOo/runner/convwatch/IniFile.java
@@ -102,7 +102,7 @@ class IniFile
*/
public boolean is()
{
- return m_aList.size() > 1 ? true : false;
+ return m_aList.size() > 1;
}
diff --git a/qadevOOo/runner/convwatch/OfficePrint.java b/qadevOOo/runner/convwatch/OfficePrint.java
index 5776567c471a..080b68534933 100644
--- a/qadevOOo/runner/convwatch/OfficePrint.java
+++ b/qadevOOo/runner/convwatch/OfficePrint.java
@@ -682,7 +682,7 @@ public class OfficePrint {
// System.out.println(aPrinterProps[nPropIndex].Name);
nPropIndex++;
}
- isBusy = (aPrinterProps[nPropIndex].Value == Boolean.TRUE) ? true : false;
+ isBusy = (aPrinterProps[nPropIndex].Value == Boolean.TRUE);
TimeHelper.waitInSeconds(1, "is print ready?");
nPrintCount++;
if (nPrintCount > 3600)
diff --git a/qadevOOo/runner/graphical/IniFile.java b/qadevOOo/runner/graphical/IniFile.java
index c3a72ecfd747..23a4290548ae 100644
--- a/qadevOOo/runner/graphical/IniFile.java
+++ b/qadevOOo/runner/graphical/IniFile.java
@@ -123,7 +123,7 @@ public class IniFile implements Enumeration<String>
*/
public boolean is()
{
- return m_aList.size() > 1 ? true : false;
+ return m_aList.size() > 1;
}
/**
diff --git a/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java b/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java
index 361f105ff6ed..4c04e2249eaa 100644
--- a/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java
+++ b/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java
@@ -652,7 +652,7 @@ public class OpenOfficePostscriptCreator implements IOffice
// System.out.println(aPrinterProps[nPropIndex].Name);
nPropIndex++;
}
- isBusy = (aPrinterProps[nPropIndex].Value == Boolean.TRUE) ? true : false;
+ isBusy = (aPrinterProps[nPropIndex].Value == Boolean.TRUE);
TimeHelper.waitInSeconds(1, "is print ready?");
nPrintCount++;
if (nPrintCount > 3600)