Modify

Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#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 Don-vip)

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 Don-vip, 8 years ago

Description: modified (diff)

comment:2 by Don-vip, 8 years ago

Description: modified (diff)

comment:3 by wiktorn, 8 years ago

Wouldn't change of regression test asserts from *.equals(...) to *.equalsEpsilon(...) suffice?

Though, this could impact other places, where we are comparing using equals(...) of LatLon's and EastNorth's

But isn't the thing, that we should do anyway?

comment:4 by Don-vip, 8 years ago

Cc: simon04 bastiK added

It would work, yes. Paul, Simon, what do you think?

comment:5 by simon04, 8 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 Don-vip, 8 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.

comment:7 by Don-vip, 8 years ago

Resolution: fixed
Status: newclosed

In 8793/josm:

fix #11889 - adapt projection regression test to Java 9. Safe approach: keep exact comparison but duplicate data files.

comment:8 by Don-vip, 8 years ago

In 8796/josm:

fix #11889 - adapt projection regression test to Java 9 for Jenkins build

comment:9 by Don-vip, 8 years ago

In 8797/josm:

fix #11889 - adapt projection regression test to Java 9 for Jenkins build

comment:10 by bastiK, 7 years ago

In 12013/josm:

see #11889 - backport improved version of Math.toDegrees and Math.toRadians from Java 9

comment:11 by Don-vip, 7 years ago

In 12015/josm:

see #11889 - fix javadoc warnings

comment:12 by Don-vip, 7 years ago

In 12131/josm:

see #11889, see #11924, see #13387 - use backported versions of Math.toDegrees/toRadians (more accurate and faster) - to revert when migrating to Java 9

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.