#11889 closed enhancement (fixed)
Tiny differences in projection regression unit test with Java 9
| Reported by: | Don-vip | Owned by: | team |
|---|---|---|---|
| Priority: | minor | Milestone: | 15.09 |
| Component: | Core | Version: | |
| Keywords: | java9 unit test projection | Cc: | simon04, bastiK |
Description (last modified by )
I have added Java 9 basic support to JOSM in r8777:8778.
JOSM now compiles and works fine, as only one unit test is failing.
I think this is due to a change of implementation of Math.toDegrees in Java 9, see javabug:8051808 and javabug:4477961.
I'm not sure what's the best solution for this issue. I'd like to have the test working fine for the three configurations (JDK7, 8, 9).
Attachments (0)
Change History (12)
comment:1 by , 10 years ago
| Description: | modified (diff) |
|---|
comment:2 by , 10 years ago
| Description: | modified (diff) |
|---|
comment:3 by , 10 years ago
comment:5 by , 10 years ago
To my understanding, performing a projection (and back) often involves a loss of precision. So I doubt that bitwise double equivalence is necessary. equalsEpsilon seems an adequate replacement to me …
comment:6 by , 10 years ago
I'm afraid that's against the spirit of this test. I'm going to take a safer approach right now, we'll see later if we can switch back to an epsilon-based version.



Wouldn't change of regression test asserts from
*.equals(...)to*.equalsEpsilon(...)suffice?Though, this could impact other places, where we are comparing using
equals(...)ofLatLon's andEastNorth'sBut isn't the thing, that we should do anyway?