-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P4
-
Affects Version/s: 12
-
Component/s: core-libs
-
b05
| Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
|---|---|---|---|---|---|---|
| JDK-8299210 | 11.0.19-oracle | Ramesh Gangadhar | P4 | Resolved | Fixed | b01 |
| JDK-8299696 | 11.0.19 | Goetz Lindenmaier | P4 | Resolved | Fixed | b01 |
| JDK-8349129 | 8u461 | Shivangi Gupta | P4 | Resolved | Fixed | b01 |
Ref: ./java/lang/invoke/lookup/SpecialStatic.java
assertEquals(result, 1);
It passes (actual, expected) but junit.Assert.assertEquals takes (expected, actual). This is the opposite of what testng.Assert.assertEquals does.
If the assertion fails the error message is very confusing:
java.lang.AssertionError: expected:<3> but was:<1>
instead of
java.lang.AssertionError: expected:<1> but was:<3>
The mix of junit and testng throughout the tests means it is very easy to get this wrong and there are likely other occurrences.
assertEquals(result, 1);
It passes (actual, expected) but junit.Assert.assertEquals takes (expected, actual). This is the opposite of what testng.Assert.assertEquals does.
If the assertion fails the error message is very confusing:
java.lang.AssertionError: expected:<3> but was:<1>
instead of
java.lang.AssertionError: expected:<1> but was:<3>
The mix of junit and testng throughout the tests means it is very easy to get this wrong and there are likely other occurrences.
- backported by
-
JDK-8299210 [TESTBUG] assertEquals is invoked with the arguments in the wrong order
-
- Resolved
-
-
JDK-8299696 [TESTBUG] assertEquals is invoked with the arguments in the wrong order
-
- Resolved
-
-
JDK-8349129 [TESTBUG] assertEquals is invoked with the arguments in the wrong order
-
- Resolved
-