File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
main/java/software/amazon/awssdk/utils
test/java/software/amazon/awssdk/utils Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -302,7 +302,7 @@ public static String trimToEmpty(final String str) {
302
302
* references are considered to be equal. The comparison is case sensitive.</p>
303
303
*
304
304
* <pre>
305
- * StringUtils.equals(null, null) = true
305
+ * StringUtils.equals(null, null) = false
306
306
* StringUtils.equals(null, "abc") = false
307
307
* StringUtils.equals("abc", null) = false
308
308
* StringUtils.equals("abc", "abc") = true
Original file line number Diff line number Diff line change @@ -177,4 +177,13 @@ public void repeat_negativeCount_shouldThrowIae() {
177
177
public void repeat_maxCount_shouldThrowOom () {
178
178
StringUtils .repeat ("a" , Integer .MAX_VALUE );
179
179
}
180
+
181
+ @ Test
182
+ public void testEquals () {
183
+ assertFalse (StringUtils .equals (null , null ));
184
+ assertFalse (StringUtils .equals (null , "abc" ));
185
+ assertFalse (StringUtils .equals ("abc" , null ));
186
+ assertTrue (StringUtils .equals ("abc" , "abc" ));
187
+ assertFalse (StringUtils .equals ("abc" , "ABC" ));
188
+ }
180
189
}
You can’t perform that action at this time.
0 commit comments