Skip to content
This repository has been archived by the owner on May 31, 2022. It is now read-only.

Improves comparison of strings in method isEqual of DefaultRedirectResolver #1745

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,10 @@ private boolean matchQueryParams(MultiValueMap<String, String> registeredRedirec
* @return true if strings are equal, false otherwise
*/
private boolean isEqual(String str1, String str2) {
if (StringUtils.isEmpty(str1) && StringUtils.isEmpty(str2)) {
return true;
} else if (!StringUtils.isEmpty(str1)) {
return str1.equals(str2);
if (StringUtils.isEmpty(str1)) {
return StringUtils.isEmpty(str2);
} else {
return false;
return str1.equals(str2);
}
}

Expand Down