Kaydet (Commit) f1b8d883 authored tarafından rbuj's avatar rbuj Kaydeden (comit) Noel Grandin

qadevOOo: use String.length()==0 instead of String.equals(empty string)

Change-Id: I5cdd1fb4fe77c7fc9614f2a6de8995d98d60b551
Reviewed-on: https://gerrit.libreoffice.org/11368Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
Tested-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst 037d03b9
...@@ -320,7 +320,7 @@ public class GraphicalDifferenceCheck ...@@ -320,7 +320,7 @@ public class GraphicalDifferenceCheck
private static String ensureEndingFileSep(String s) 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; s = s.trim() + File.separator;
} }
......
...@@ -48,7 +48,7 @@ public class CfgParser ...@@ -48,7 +48,7 @@ public class CfgParser
{ {
debug = param.getBool(PropertyName.DEBUG_IS_ACTIVE); debug = param.getBool(PropertyName.DEBUG_IS_ACTIVE);
Properties cfg = null; Properties cfg = null;
if (iniFile.equals("")) if (iniFile.length() == 0)
{ {
//no iniFile given, search one in the users home directory //no iniFile given, search one in the users home directory
cfg = getProperties(getDefaultFileName(true)); cfg = getProperties(getDefaultFileName(true));
......
...@@ -183,7 +183,7 @@ public class OfficeProvider implements AppProvider ...@@ -183,7 +183,7 @@ public class OfficeProvider implements AppProvider
Exception exConnectFailed = null; Exception exConnectFailed = null;
boolean isExecutable = false; boolean isExecutable = false;
boolean isAppKnown = ((cncstr.indexOf("host=localhost") > 0) || (cncstr.indexOf("pipe,name=") > 0)); 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) if (isAppKnown)
{ {
......
...@@ -377,7 +377,7 @@ public class XMLTools { ...@@ -377,7 +377,7 @@ public class XMLTools {
super.startElement(name, attrs) ; super.startElement(name, attrs) ;
if (tags.containsKey(name)) { if (tags.containsKey(name)) {
String outerTag = tags.get(name); String outerTag = tags.get(name);
if (!outerTag.equals("")) { if (outerTag.length() != 0) {
boolean isInTag = false ; boolean isInTag = false ;
for (int i = 0; i < tagStack.size(); i++) { for (int i = 0; i < tagStack.size(); i++) {
if (outerTag.equals(tagStack.get(i))) { if (outerTag.equals(tagStack.get(i))) {
...@@ -401,7 +401,7 @@ public class XMLTools { ...@@ -401,7 +401,7 @@ public class XMLTools {
if (chars.containsKey(ch)) { if (chars.containsKey(ch)) {
String outerTag = chars.get(ch); String outerTag = chars.get(ch);
if (!outerTag.equals("")) { if (outerTag.length() != 0) {
boolean isInTag = false ; boolean isInTag = false ;
for (int i = 0; i < tagStack.size(); i++) { for (int i = 0; i < tagStack.size(); i++) {
if (outerTag.equals(tagStack.get(i))) { if (outerTag.equals(tagStack.get(i))) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment