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
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
AWS Java SDK version used
2.39.6
JDK version used
8
Operating System and version
Windows 11
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
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
AWS Java SDK version used
2.39.6
JDK version used
8
Operating System and version
Windows 11