Deprecate StringUtils.isEmpty(Object) and replace remaining usage

Closes gh-25945
This commit is contained in:
Juergen Hoeller
2020-10-21 16:09:26 +02:00
parent 07769ddcc6
commit 621295dbd8
8 changed files with 13 additions and 15 deletions

View File

@@ -129,10 +129,10 @@ public class RequestPartMethodArgumentResolver extends AbstractMessageReaderArgu
if (requestPart != null) {
name = requestPart.name();
}
if (StringUtils.isEmpty(name)) {
if (!StringUtils.hasLength(name)) {
name = methodParam.getParameterName();
}
if (StringUtils.isEmpty(name)) {
if (!StringUtils.hasLength(name)) {
throw new IllegalArgumentException("Request part name for argument type [" +
methodParam.getNestedParameterType().getName() +
"] not specified, and parameter name information not found in class file either.");

View File

@@ -200,7 +200,7 @@ public final class CloseStatus {
* @since 5.3
*/
public static CloseStatus create(int code, @Nullable String reason) {
if (StringUtils.isEmpty(reason)) {
if (!StringUtils.hasText(reason)) {
switch (code) {
case 1000:
return NORMAL;