Skip to content

Commit

Permalink
Fix #3135 - assertEquals failure message when array element is null
Browse files Browse the repository at this point in the history
  • Loading branch information
zAlbee committed Jun 13, 2024
1 parent ee7820d commit 6bdf496
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Current (7.11.0)
Fixed: GITHUB-3028: Execution stalls when using "use-global-thread-pool" (Krishnan Mahadevan)
Fixed: GITHUB-3122: Update JCommander to 1.83 (Antoine Dessaigne)
Fixed: GITHUB-3135: assertEquals on arrays - Failure message is missing information about the array index when an array element is unexpectedly null or non-null (Albert Choi)

7.10.2
Fixed: GITHUB-3117: ListenerComparator doesn't work (Krishnan Mahadevan)
Expand Down
2 changes: 1 addition & 1 deletion testng-asserts/src/main/java/org/testng/Assert.java
Original file line number Diff line number Diff line change
Expand Up @@ -1780,7 +1780,7 @@ public static void assertEquals(Object[] actual, Object[] expected, String messa
continue;
}
if ((a == null && e != null) || (a != null && e == null)) {
failNotEquals(a, e, message);
failNotEquals(a, e, errorMessage);
}
// Compare by value for multi-dimensional array.
if (e.getClass().isArray()) {
Expand Down

0 comments on commit 6bdf496

Please sign in to comment.