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:
@@ -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";
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user