Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8b620c3

Browse files
committedJun 24, 2025
Fix comments that are different from the action
1 parent 00d1c90 commit 8b620c3

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed
 

‎utils/src/main/java/software/amazon/awssdk/utils/StringUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ public static String trimToEmpty(final String str) {
302302
* references are considered to be equal. The comparison is case sensitive.</p>
303303
*
304304
* <pre>
305-
* StringUtils.equals(null, null) = true
305+
* StringUtils.equals(null, null) = false
306306
* StringUtils.equals(null, "abc") = false
307307
* StringUtils.equals("abc", null) = false
308308
* StringUtils.equals("abc", "abc") = true

‎utils/src/test/java/software/amazon/awssdk/utils/StringUtilsTest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,4 +177,13 @@ public void repeat_negativeCount_shouldThrowIae() {
177177
public void repeat_maxCount_shouldThrowOom() {
178178
StringUtils.repeat("a", Integer.MAX_VALUE);
179179
}
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+
}
180189
}

0 commit comments

Comments
 (0)
Please sign in to comment.