diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-13 10:52:12 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-20 10:35:53 +0200 |
commit | a753a458e582dc0aa5e94ea350f4db06488f26f2 (patch) | |
tree | 668725470ddf51b52f3edc290e996dc2576c7dcf /scripting/workben | |
parent | 60f152caeee38579433a31dd3a98e91dc3d23ff6 (diff) |
java: avoid if..else when returning boolean values
Change-Id: Iab52762a9abfe8735223372b09638ce9d8d44318
Diffstat (limited to 'scripting/workben')
7 files changed, 9 insertions, 42 deletions
diff --git a/scripting/workben/ifc/scripting/_XFunctionProvider.java b/scripting/workben/ifc/scripting/_XFunctionProvider.java index 143e33febbd7..7a51288885e8 100644 --- a/scripting/workben/ifc/scripting/_XFunctionProvider.java +++ b/scripting/workben/ifc/scripting/_XFunctionProvider.java @@ -77,9 +77,6 @@ public class _XFunctionProvider extends MultiMethodTest { output = "XFunction.class"; log.println("expected: " + expected + ", output: " + output); - if (output.equals(expected)) - return true; - else - return false; + return (output.equals(expected)); } } diff --git a/scripting/workben/ifc/scripting/_XScriptInfoAccess.java b/scripting/workben/ifc/scripting/_XScriptInfoAccess.java index b6107d3da7ef..18b8a41d4d0e 100644 --- a/scripting/workben/ifc/scripting/_XScriptInfoAccess.java +++ b/scripting/workben/ifc/scripting/_XScriptInfoAccess.java @@ -86,10 +86,7 @@ public class _XScriptInfoAccess extends MultiMethodTest { } log.println("expected: " + expected + ", output: " + output); - if (output.equals(expected)) - return true; - else - return false; + return (output.equals(expected)); } public void _getImplementations() { @@ -143,10 +140,7 @@ public class _XScriptInfoAccess extends MultiMethodTest { } log.println("expected: " + expected + ", output: " + output); - if (output.equals(expected)) - return true; - else - return false; + return (output.equals(expected)); } public void _getAllImplementations() { @@ -196,9 +190,6 @@ public class _XScriptInfoAccess extends MultiMethodTest { } log.println("expected: " + expected + ", output: " + output); - if (output.equals(expected)) - return true; - else - return false; + return (output.equals(expected)); } } diff --git a/scripting/workben/ifc/scripting/_XScriptInvocation.java b/scripting/workben/ifc/scripting/_XScriptInvocation.java index e7c4e28acf46..a829fb553c67 100644 --- a/scripting/workben/ifc/scripting/_XScriptInvocation.java +++ b/scripting/workben/ifc/scripting/_XScriptInvocation.java @@ -133,10 +133,7 @@ public class _XScriptInvocation extends MultiMethodTest { ctx.dispose(); log.println("expected: " + expected + ", output: " + output); - if (output.equals(expected)) - return true; - else - return false; + return (output.equals(expected)); } private int getStorageId(String location) { diff --git a/scripting/workben/ifc/scripting/_XScriptNameResolver.java b/scripting/workben/ifc/scripting/_XScriptNameResolver.java index 77385d28a3be..b2f264d1e4b1 100644 --- a/scripting/workben/ifc/scripting/_XScriptNameResolver.java +++ b/scripting/workben/ifc/scripting/_XScriptNameResolver.java @@ -112,10 +112,7 @@ public class _XScriptNameResolver extends MultiMethodTest { } log.println("expected: " + expected + ", output: " + output); - if (output.equals(expected)) - return true; - else - return false; + return (output.equals(expected)); } private int getStorageId(String location) { diff --git a/scripting/workben/ifc/scripting/_XScriptSecurity.java b/scripting/workben/ifc/scripting/_XScriptSecurity.java index 7791aa92a13e..cd3b65668f7f 100644 --- a/scripting/workben/ifc/scripting/_XScriptSecurity.java +++ b/scripting/workben/ifc/scripting/_XScriptSecurity.java @@ -181,14 +181,7 @@ public class _XScriptSecurity extends MultiMethodTest { expectedPath = uri.substring(0, uri.lastIndexOf('/')); } log.println("pathlist: expected: " + expectedPath + ", output: " + setPath); - if( setPath.equals( expectedPath ) ) - { - return true; - } - else - { - return false; - } + return setPath.equals( expectedPath ); } return true; } diff --git a/scripting/workben/installer/IdeVersion.java b/scripting/workben/installer/IdeVersion.java index b75d5b38a04e..ab50752e2cd4 100644 --- a/scripting/workben/installer/IdeVersion.java +++ b/scripting/workben/installer/IdeVersion.java @@ -299,11 +299,7 @@ class MyTableModelIDE extends AbstractTableModel { @Override public boolean isCellEditable(int row, int col) { - if (col == 0) { - return true; - } else { - return false; - } + return (col == 0); } @Override diff --git a/scripting/workben/installer/Version.java b/scripting/workben/installer/Version.java index 4d125dee8fe6..2540f62f3dd6 100644 --- a/scripting/workben/installer/Version.java +++ b/scripting/workben/installer/Version.java @@ -314,11 +314,7 @@ class MyTableModel extends AbstractTableModel { @Override public boolean isCellEditable(int row, int col) { - if (col == 0) { - return true; - } else { - return false; - } + return (col == 0); } @Override |