Consistently use CharSequence.isEmpty() for emptiness checks

Closes gh-33577
This commit is contained in:
Tran Ngoc Nhan
2024-09-21 10:39:33 +07:00
committed by Sam Brannen
parent f321ef9ec2
commit c85050eb43
6 changed files with 11 additions and 11 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -323,7 +323,7 @@ public class UrlTag extends HtmlEscapingAwareTag implements ParamAware {
StringBuilder qs = new StringBuilder();
for (Param param : params) {
if (!usedParams.contains(param.getName()) && StringUtils.hasLength(param.getName())) {
if (includeQueryStringDelimiter && qs.length() == 0) {
if (includeQueryStringDelimiter && qs.isEmpty()) {
qs.append('?');
}
else {