This repository has been archived by the owner on May 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Same values, but with different types, was considered different. #156
Milestone
Comments
Thanks for giving us feedback about the API, WIP to fix it. |
from JavaDoc: /**
|
Java is rather strict on that, it is not something a JSR 363 implementation introduced or causes. BigInteger.ONE.equals(Integer.valueOf(1) to be In some particular subtypes like |
In fact the RI must behave exactly the same here, so any PR or improvement should be available to both. |
FWI do it on RI is easier than on SE |
This was referenced May 27, 2017
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
@Test
public void test_equality() throws Exception {
ComparableQuantity<Length> value = Quantities.getQuantity(20.0, Units.METRE);
ComparableQuantity<Length> anotherValue = Quantities.getQuantity(20, Units.METRE);
assertEquals(value, anotherValue);
}
Result
java.lang.AssertionError: Expected :20.0 m Actual :20 m
The text was updated successfully, but these errors were encountered: