From f1b8d8832d38621ae9fbe08bf9bde414230fc5c3 Mon Sep 17 00:00:00 2001 From: rbuj Date: Wed, 10 Sep 2014 00:02:15 +0200 Subject: qadevOOo: use String.length()==0 instead of String.equals(empty string) Change-Id: I5cdd1fb4fe77c7fc9614f2a6de8995d98d60b551 Reviewed-on: https://gerrit.libreoffice.org/11368 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java | 2 +- qadevOOo/runner/helper/CfgParser.java | 2 +- qadevOOo/runner/helper/OfficeProvider.java | 2 +- qadevOOo/runner/util/XMLTools.java | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java b/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java index 1e6971868f32..2d59022c527d 100644 --- a/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java +++ b/qadevOOo/runner/convwatch/GraphicalDifferenceCheck.java @@ -320,7 +320,7 @@ public class GraphicalDifferenceCheck private static String ensureEndingFileSep(String s) { - if(s != null && !s.equals("") && !s.endsWith(File.separator)) + if(s != null && s.length() != 0 && !s.endsWith(File.separator)) { s = s.trim() + File.separator; } diff --git a/qadevOOo/runner/helper/CfgParser.java b/qadevOOo/runner/helper/CfgParser.java index 263655f3aafd..6c77461c3880 100644 --- a/qadevOOo/runner/helper/CfgParser.java +++ b/qadevOOo/runner/helper/CfgParser.java @@ -48,7 +48,7 @@ public class CfgParser { debug = param.getBool(PropertyName.DEBUG_IS_ACTIVE); Properties cfg = null; - if (iniFile.equals("")) + if (iniFile.length() == 0) { //no iniFile given, search one in the users home directory cfg = getProperties(getDefaultFileName(true)); diff --git a/qadevOOo/runner/helper/OfficeProvider.java b/qadevOOo/runner/helper/OfficeProvider.java index 6b21841b1802..d5ac4bacbaf1 100644 --- a/qadevOOo/runner/helper/OfficeProvider.java +++ b/qadevOOo/runner/helper/OfficeProvider.java @@ -183,7 +183,7 @@ public class OfficeProvider implements AppProvider Exception exConnectFailed = null; boolean isExecutable = false; boolean isAppKnown = ((cncstr.indexOf("host=localhost") > 0) || (cncstr.indexOf("pipe,name=") > 0)); - isAppKnown &= !((String) param.get("AppExecutionCommand")).equals(""); + isAppKnown &= ((String) param.get("AppExecutionCommand")).length() != 0; if (isAppKnown) { diff --git a/qadevOOo/runner/util/XMLTools.java b/qadevOOo/runner/util/XMLTools.java index a59f523758ca..5f43f06d7c0c 100644 --- a/qadevOOo/runner/util/XMLTools.java +++ b/qadevOOo/runner/util/XMLTools.java @@ -377,7 +377,7 @@ public class XMLTools { super.startElement(name, attrs) ; if (tags.containsKey(name)) { String outerTag = tags.get(name); - if (!outerTag.equals("")) { + if (outerTag.length() != 0) { boolean isInTag = false ; for (int i = 0; i < tagStack.size(); i++) { if (outerTag.equals(tagStack.get(i))) { @@ -401,7 +401,7 @@ public class XMLTools { if (chars.containsKey(ch)) { String outerTag = chars.get(ch); - if (!outerTag.equals("")) { + if (outerTag.length() != 0) { boolean isInTag = false ; for (int i = 0; i < tagStack.size(); i++) { if (outerTag.equals(tagStack.get(i))) { -- cgit v1.2.3