Skip to content

Commit 0ec5a7b

Browse files
committed
Support mixed boxed and unboxed primitives in assertEquals()
Prior to this commit, the following resulting in a compiler error due to ambiguity. assertEquals(42, Integer.valueOf("42")); The same holds true for all primitive types other than `boolean`. This commit addresses this shortcoming by introducing assertEquals() variants that support mixed boxed and unboxed primitive values. Issue: #1638
1 parent 45a8c8f commit 0ec5a7b

File tree

3 files changed

+501
-33
lines changed

3 files changed

+501
-33
lines changed

documentation/src/docs/asciidoc/release-notes/release-notes-5.4.0-M1.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ repository on GitHub.
5454

5555
==== New Features and Improvements
5656

57+
* New `Assertions.assertEquals()` variants that accept mixed boxed and unboxed primitive
58+
values, allowing statements such as `assertEquals(42, Integer.valueOf("42"))` to
59+
compile.
5760
* New `Assertions.assertNotEquals()` variants that accept the following primitive data
5861
types: `char`, `byte`, `short`, `int`, `long`, `float`, and `double`.
5962
* Implicit conversion from hexadecimal and octal string representations to integral types

0 commit comments

Comments
 (0)