Support Java 9

Description

Placeholder task for work related to supporting Java 9. Note that Java 9 is not an LTS release so we will not be supporting it as a deployment environment; work here is to support testing under Java 9, and filing off the edges early so that our support of the next LTS release (Java 11, September 2018) will be less painful.

Environment

None
100% Done
Type
Key
Summary
Priority
Story Points
Assignee
Status

Activity

Ian Young 
September 17, 2018 at 2:55 PM

Not required to build under Java 7, so removing that "fix version".

Ian Young 
March 15, 2018 at 11:33 AM

Updated maint-7 branch commit f355f99b20a5f53ac52822d70ac9d3d941df0536

Updated master branch commit 8c37e86950b34c5e53b29a337db1fc9878174e17

This updates us to the maven-javadoc-plugin 3.0.0 for forwards compatibility, but preserves the attempt to suppress doclint. The result is:

  • Java 7 doesn't show doclint (because it hadn't been invented),

  • Java 8 doesn't show doclint (because it has been suppressed),

  • Java 9 shows some doclint warnings rather than errors.

I am guessing that further down the road some of those unsuppressable warnings will turn into errors and need to be actually fixed. See JPAR-115.

Ian Young 
November 10, 2017 at 4:51 PM

By the way, I suspect that the root cause of the failures in java-opensaml and java-identity-provider are the same as for the one in java-support, although the test in the latter actually makes less sense. The details are in JSPT-75.

Ian Young 
November 10, 2017 at 4:45 PM

There are some tests which we know fail under Java 9. These are now dynamically avoided to allow us to apply as many tests as possible before we find the time to fix those.

There is one such test in java-support, see JSPT-75. This one just seems to be broken; it's not testing what we thought it was.

There are multiple tests in java-opensaml and java-identity-provider that construct and serialise XML and then use hashCode() to see if they have got the right order. These need to be fixed so that they perform a semantic comparison rather than using hashCode() which is equivalent to a literal comparison with a document we no longer have.

The following commit bypass those checks under a Java 9 runtime while leaving the other parts of the test live. We need to come back and make those tests do the work to perform semantic comparisons instead. They are in:

java-opensaml: f4dc82184f64301363d3d1e9684634db60b69cb3

java-identity-provider: d0635059528aae1c33cdc812d0da0826508e7478

Ian Young 
November 10, 2017 at 3:48 PM

Fix Java 9 modules used in tests. This is related to

https://issues.apache.org/jira/browse/SUREFIRE-1424

The quick fix is probably good enough for the maint-7 branch, but we will need to investigate modules more seriously when we start IdP V4, as we have some dependencies on some things that access now-deprecated parts of the JDK. Hopefully the SUREFIRE-1424 issue is fixed by then.

java-parent-project maint-7 6c8ae8bd4255913fd501c666d801868e9e296383

java-parent-project master 9386d54d82b8231d7272859249e5405315e1c252

Fixed

Details

Assignee

Reporter

Fix versions

Affects versions

Created September 25, 2017 at 3:20 PM
Updated April 21, 2020 at 2:59 PM
Resolved April 21, 2020 at 2:59 PM