-
Notifications
You must be signed in to change notification settings - Fork 965
Open
Labels
bugThis issue is a bug.This issue is a bug.needs-reviewThis issue or PR needs review from the team.This issue or PR needs review from the team.p3This is a minor priority issueThis is a minor priority issue
Description
Describe the bug
StringUtils.equals' javadoc says that passing in two nulls will return true, but the code will always return false because it does a short circuit check for if one of them is null.
Changing it to return true would match the behavior of other StringUtils implementation, such as Apache Commons.
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
StringUtils.equals(null, null) == true
Current Behavior
StringUtils.equals(null, null) == false
Reproduction Steps
assertTrue(StringUtils.equals(null, null));
Possible Solution
Change the code to check if both arguments are null
Additional Information/Context
This bug has been around for a long time, including SDK v1
AWS Java SDK version used
2.39.6
JDK version used
8
Operating System and version
Windows 11
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.needs-reviewThis issue or PR needs review from the team.This issue or PR needs review from the team.p3This is a minor priority issueThis is a minor priority issue