diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-13 10:19:51 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-20 10:35:53 +0200 |
commit | 60f152caeee38579433a31dd3a98e91dc3d23ff6 (patch) | |
tree | 15ba69f938e09bb173ca7de2e1b21b62e740ea40 /scripting/java/org/openoffice/idesupport/CommandLineTools.java | |
parent | 2922a967a1da5f9c0a07b5390906307d0ae6fe48 (diff) |
java: avoid unnecessary comparisons in boolean expressions
i.e. stuff like "x == true"
Change-Id: Ib82a4a30e736df392405332fa197b588482cffcf
Diffstat (limited to 'scripting/java/org/openoffice/idesupport/CommandLineTools.java')
-rw-r--r-- | scripting/java/org/openoffice/idesupport/CommandLineTools.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scripting/java/org/openoffice/idesupport/CommandLineTools.java b/scripting/java/org/openoffice/idesupport/CommandLineTools.java index 5cb8d5f51b55..0b4747d1ccf9 100644 --- a/scripting/java/org/openoffice/idesupport/CommandLineTools.java +++ b/scripting/java/org/openoffice/idesupport/CommandLineTools.java @@ -63,7 +63,7 @@ public class CommandLineTools { } File officeDir = new File(officePath); - if (officeDir.exists() == false || officeDir.isDirectory() == false) + if (!officeDir.exists() || !officeDir.isDirectory()) { driver.fatalUsage( "Error: Office Installation path not valid: " + officePath); @@ -249,20 +249,20 @@ public class CommandLineTools { public void execute() throws Exception { - if (basedir.isDirectory() != true) { + if (!basedir.isDirectory()) { throw new Exception(basedir.getName() + " is not a directory"); } - else if (contents.exists() != true) { + else if (!contents.exists()) { throw new Exception(basedir.getName() + " does not contain a Contents directory"); } - if (language == null && parcelxml.exists() == false) { + if (language == null && !parcelxml.exists()) { throw new Exception(parcelxml.getName() + " not found and language " + "not specified"); } - if (language != null && parcelxml.exists() == true) { + if (language != null && parcelxml.exists()) { ParcelDescriptor desc; String desclang = ""; @@ -308,7 +308,7 @@ public class CommandLineTools { desc.write(); } else { - if (parcelxml.exists() == false) + if (!parcelxml.exists()) throw new Exception("No valid scripts found"); } |