diff options
author | rbuj <robert.buj@gmail.com> | 2014-09-13 10:45:57 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2014-09-13 15:09:44 +0000 |
commit | fafb0db5d24010f7390df0df791cebe3e6ce3164 (patch) | |
tree | b6323a1feffc90b4db0e35a7029f79a7dd720996 /scripting | |
parent | 81711134207a2715ba6b41e659c1e80e0cd4e05d (diff) |
scripting: use String.length()==0 instead of String.equals(empty string)
Change-Id: Icff6a5d19aaf7ac7ebb0cd54140bd388cba0f24d
Reviewed-on: https://gerrit.libreoffice.org/11431
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'scripting')
6 files changed, 7 insertions, 7 deletions
diff --git a/scripting/java/com/sun/star/script/framework/browse/DialogFactory.java b/scripting/java/com/sun/star/script/framework/browse/DialogFactory.java index 78c97cf5b07a..1708bdc60888 100644 --- a/scripting/java/com/sun/star/script/framework/browse/DialogFactory.java +++ b/scripting/java/com/sun/star/script/framework/browse/DialogFactory.java @@ -140,12 +140,12 @@ public class DialogFactory private XDialog createInputDialog(String title, String prompt) throws com.sun.star.uno.Exception { - if (title == null || title.equals("")) + if (title == null || title.length() == 0) { title = "Scripting Framework"; } - if (prompt == null || prompt.equals("")) + if (prompt == null || prompt.length() == 0) { prompt = "Enter name"; } diff --git a/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java b/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java index 0e5c721ad6a1..a2e2423ffd56 100644 --- a/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java +++ b/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java @@ -206,7 +206,7 @@ public class ParcelBrowseNode extends PropertySet newName = AnyConverter.toString(aParams[0]); } - if ( newName == null || newName.equals("")) + if ( newName == null || newName.length() == 0) { result = new Any(new Type(Boolean.class), Boolean.FALSE); } diff --git a/scripting/java/com/sun/star/script/framework/browse/ProviderBrowseNode.java b/scripting/java/com/sun/star/script/framework/browse/ProviderBrowseNode.java index 7e7c938137d6..18cefb0d817c 100644 --- a/scripting/java/com/sun/star/script/framework/browse/ProviderBrowseNode.java +++ b/scripting/java/com/sun/star/script/framework/browse/ProviderBrowseNode.java @@ -201,7 +201,7 @@ public class ProviderBrowseNode extends PropertySet name = AnyConverter.toString(aParams[0]); } - if (name == null || name.equals("")) + if (name == null || name.length() == 0) { result = new Any(new Type(Boolean.class), Boolean.FALSE); } diff --git a/scripting/java/com/sun/star/script/framework/container/ParcelDescriptor.java b/scripting/java/com/sun/star/script/framework/container/ParcelDescriptor.java index e94e0de9cbc3..2d44ff55944e 100644 --- a/scripting/java/com/sun/star/script/framework/container/ParcelDescriptor.java +++ b/scripting/java/com/sun/star/script/framework/container/ParcelDescriptor.java @@ -332,7 +332,7 @@ public class ParcelDescriptor { tempitem = document.createElement("description"); String description = script.getDescription(); - if (description == null || description.equals("")) + if (description == null || description.length() == 0) { description = script.getLogicalName(); } diff --git a/scripting/java/org/openoffice/idesupport/SVersionRCFile.java b/scripting/java/org/openoffice/idesupport/SVersionRCFile.java index a6a841f3b7cb..883b28f00aee 100644 --- a/scripting/java/org/openoffice/idesupport/SVersionRCFile.java +++ b/scripting/java/org/openoffice/idesupport/SVersionRCFile.java @@ -127,7 +127,7 @@ public class SVersionRCFile { !(s.equals(VERSIONS_LINE))) {} while ((s = br.readLine()) != null && - !(s.equals(""))) { + s.length() != 0) { StringTokenizer tokens = new StringTokenizer(s, "="); int count = tokens.countTokens(); diff --git a/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelPropertiesVisualPanel.java b/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelPropertiesVisualPanel.java index ea2cb1b24d00..f9f529e9763d 100644 --- a/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelPropertiesVisualPanel.java +++ b/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelPropertiesVisualPanel.java @@ -151,7 +151,7 @@ public class ParcelPropertiesVisualPanel extends javax.swing.JPanel { private void changeName() { String name = recipeName.getText().trim(); - if (name.equals("")) + if (name.length() == 0) name = null; panel.setName(name); } |