Insist on using CollectionUtils.isEmpty() and StringUtils.hasLength()

search `(\w+) != null && !(\1).isEmpty\(\)`
This commit is contained in:
Yanming Zhou
2024-05-09 14:51:23 +08:00
committed by Juergen Hoeller
parent 8137cc9566
commit a02861f7db
4 changed files with 7 additions and 5 deletions

View File

@@ -220,7 +220,7 @@ public abstract class AbstractFlashMapManager implements FlashMapManager {
@Nullable
private String decodeAndNormalizePath(@Nullable String path, HttpServletRequest request) {
if (path != null && !path.isEmpty()) {
if (StringUtils.hasLength(path)) {
path = getUrlPathHelper().decodeRequestString(request, path);
if (path.charAt(0) != '/') {
String requestUri = getUrlPathHelper().getRequestUri(request);