summaryrefslogtreecommitdiff
path: root/qadevOOo/tests
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-13 10:19:51 +0200
committerNoel Grandin <noel@peralex.com>2014-08-20 10:35:53 +0200
commit60f152caeee38579433a31dd3a98e91dc3d23ff6 (patch)
tree15ba69f938e09bb173ca7de2e1b21b62e740ea40 /qadevOOo/tests
parent2922a967a1da5f9c0a07b5390906307d0ae6fe48 (diff)
java: avoid unnecessary comparisons in boolean expressions
i.e. stuff like "x == true" Change-Id: Ib82a4a30e736df392405332fa197b588482cffcf
Diffstat (limited to 'qadevOOo/tests')
-rw-r--r--qadevOOo/tests/java/ifc/awt/_XTextLayoutConstrains.java4
-rw-r--r--qadevOOo/tests/java/ifc/frame/_XDispatch.java2
-rw-r--r--qadevOOo/tests/java/ifc/linguistic2/_XDictionaryList.java2
-rw-r--r--qadevOOo/tests/java/ifc/loader/_XImplementationLoader.java2
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Draw/XMLSettingsImporter.java2
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Impress/XMLSettingsImporter.java2
6 files changed, 7 insertions, 7 deletions
diff --git a/qadevOOo/tests/java/ifc/awt/_XTextLayoutConstrains.java b/qadevOOo/tests/java/ifc/awt/_XTextLayoutConstrains.java
index 325f25692bf6..c15b5d093622 100644
--- a/qadevOOo/tests/java/ifc/awt/_XTextLayoutConstrains.java
+++ b/qadevOOo/tests/java/ifc/awt/_XTextLayoutConstrains.java
@@ -45,7 +45,7 @@ public class _XTextLayoutConstrains extends MultiMethodTest {
short nLines = 0;
Size mSize = oObj.getMinimumSize(nCols,nLines);
boolean res = ( (mSize.Height != 0) && (mSize.Width != 0) );
- if (res == false) {
+ if (!res) {
log.println("mSize.height: " + mSize.Height);
log.println("mSize.width: " + mSize.Width);
}
@@ -61,7 +61,7 @@ public class _XTextLayoutConstrains extends MultiMethodTest {
short[] nLines = new short[1];
oObj.getColumnsAndLines(nCols,nLines);
boolean res = ( (nCols[0] != 0) && (nLines[0] != 0) );
- if (res == false) {
+ if (!res) {
log.println("nCols: " + nCols[0]);
log.println("nLines: " + nLines[0]);
}
diff --git a/qadevOOo/tests/java/ifc/frame/_XDispatch.java b/qadevOOo/tests/java/ifc/frame/_XDispatch.java
index a31f9b93c5ff..98ef2463ae10 100644
--- a/qadevOOo/tests/java/ifc/frame/_XDispatch.java
+++ b/qadevOOo/tests/java/ifc/frame/_XDispatch.java
@@ -183,7 +183,7 @@ public class _XDispatch extends MultiMethodTest {
result = listener.statusChangedCalled;
- if (result == false) {
+ if (!result) {
result = checkXDispatchWithNotification();
}
diff --git a/qadevOOo/tests/java/ifc/linguistic2/_XDictionaryList.java b/qadevOOo/tests/java/ifc/linguistic2/_XDictionaryList.java
index ca5ad0110c50..62205401e4cd 100644
--- a/qadevOOo/tests/java/ifc/linguistic2/_XDictionaryList.java
+++ b/qadevOOo/tests/java/ifc/linguistic2/_XDictionaryList.java
@@ -162,7 +162,7 @@ public class _XDictionaryList extends MultiMethodTest {
tRes.tested(
"removeDictionaryListEventListener()",
- listenerCalled == false && res == true );
+ !listenerCalled && res );
}
/**
diff --git a/qadevOOo/tests/java/ifc/loader/_XImplementationLoader.java b/qadevOOo/tests/java/ifc/loader/_XImplementationLoader.java
index 8aa334a8bb1d..fb835587f34b 100644
--- a/qadevOOo/tests/java/ifc/loader/_XImplementationLoader.java
+++ b/qadevOOo/tests/java/ifc/loader/_XImplementationLoader.java
@@ -105,7 +105,7 @@ public class _XImplementationLoader extends MultiMethodTest {
throw new StatusException("Can not register implementation", e) ;
}
- if (rc == false)
+ if (!rc)
log.println("Method returned false value") ;
String[] keys ;
diff --git a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLSettingsImporter.java b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLSettingsImporter.java
index 97dc7c8db94d..0a7159a8426f 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLSettingsImporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLSettingsImporter.java
@@ -177,7 +177,7 @@ public class XMLSettingsImporter extends TestCase {
xPropSet.getPropertyValue("IsLayerMode");
logF.println("'IsLayerMode' property value is '"
+ value + "'");
- return value.booleanValue() == true;
+ return value.booleanValue();
} catch (com.sun.star.uno.Exception e) {
logF.println("Exception while checking import :") ;
e.printStackTrace(logF) ;
diff --git a/qadevOOo/tests/java/mod/_xmloff/Impress/XMLSettingsImporter.java b/qadevOOo/tests/java/mod/_xmloff/Impress/XMLSettingsImporter.java
index 02dfd150ed1f..82e5ef90fb59 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Impress/XMLSettingsImporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Impress/XMLSettingsImporter.java
@@ -191,7 +191,7 @@ public class XMLSettingsImporter extends TestCase {
}
logF.println("Property \"IsLayerMode\" after import is "
+ propValue);
- if ( propValue.booleanValue() == true ) {
+ if ( propValue.booleanValue() ) {
return true;
} else {
return false;