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>
This commit is contained in:
rbuj
2014-09-13 10:45:57 +02:00
committed by David Tardon
parent 8171113420
commit fafb0db5d2
6 changed files with 7 additions and 7 deletions

View File

@@ -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";
}

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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();
}