Skip to content

Commit

Permalink
Use String#isEmpty()
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Nov 28, 2023
1 parent ef9543b commit 49f325b
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public static LocalizationContext getLocalizationContext(JellyContext jellyConte
LocalizationContext locCtxt = null;
ResourceBundle bundle = null;

if ((basename == null) || basename.equals("")) {
if ((basename == null) || basename.isEmpty()) {
return new LocalizationContext();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public void doTag(XMLOutput output) throws JellyTagException {
// Set time zone
TimeZone tz = null;
if ((etimeZone instanceof String)
&& ((String) etimeZone).equals("")) {
&& ((String) etimeZone).isEmpty()) {
etimeZone = null;
}
if (etimeZone != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public void doTag(XMLOutput output) throws JellyTagException {
if (valueInput == null) {
locale = Locale.getDefault();
} else if (valueInput instanceof String) {
if (((String) valueInput).trim().equals("")) {
if (((String) valueInput).trim().isEmpty()) {
locale = Locale.getDefault();
} else {
locale = parseLocale((String) valueInput, (String) variantInput);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void doTag(XMLOutput output) throws JellyTagException {
timeZone = TimeZone.getTimeZone("GMT");
}
else if (valueInput instanceof String) {
if (((String) valueInput).trim().equals("")) {
if (((String) valueInput).trim().isEmpty()) {
timeZone = TimeZone.getTimeZone("GMT");
} else {
timeZone = TimeZone.getTimeZone((String) valueInput);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void doTag(XMLOutput output) throws JellyTagException {
timeZone = TimeZone.getTimeZone("GMT");
}
else if (valueInput instanceof String) {
if (((String) valueInput).trim().equals("")) {
if (((String) valueInput).trim().isEmpty()) {
timeZone = TimeZone.getTimeZone("GMT");
} else {
timeZone = TimeZone.getTimeZone((String) valueInput);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public void doTag(XMLOutput output) {
// trim the input for tab completion
input = input.trim();

if (defaultInput != null && input.trim().equals("")) {
if (defaultInput != null && input.trim().isEmpty()) {
input = defaultInput;
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagEx
call.setTargetEndpointAddress(new java.net.URL(endpoint));
call.setOperationName(new QName(namespace, method));

if ( userName != null && !userName.equals("") ) {
if ( userName != null && !userName.isEmpty() ) {
call.setUsername( userName );
call.setPassword( password );
}
Expand Down

0 comments on commit 49f325b

Please sign in to comment.