Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Java 9 version numbering better and better apply normalization #130

Closed
uschindler opened this issue Oct 2, 2017 · 3 comments
Closed
Assignees
Milestone

Comments

@uschindler
Copy link
Member

Currently Java 9 is translated internally to Java "1.9". The normalization should take care of all versions >=9 and normalize them to no longer use "1." prefix. There are also some places that might break with 2 digit major versions (like 10 or 18).

@uschindler uschindler added this to the 2.4 milestone Oct 2, 2017
@uschindler uschindler self-assigned this Oct 2, 2017
@dweiss
Copy link
Contributor

dweiss commented Oct 3, 2017

Some ready to use regexps here? :) http://openjdk.java.net/jeps/223

@uschindler
Copy link
Member Author

uschindler commented Oct 3, 2017

Not so complicated. The main issue is only to allow many different formats for Java "release/source/target" versions and normalize them, so the lookup of the signatures resources work as expected. Currently all versions are normalized from "major" to "1.major" as a dirty hack.

I have the patch ready that renames the Java 9 signatures files to use plain "9". The parser/normalizer of target/source/release was adapted to normalize only versions < 9 to use "1.major" format.

This is no functionality change, forbiddenapis works as before and accepts same versions, but I am able to rename the signatures resources and the messages printed while loading them are more meaningful:

-check-bundled-signatures:
[forbiddenapis] Reading bundled API signatures: jdk-unsafe-9
[forbiddenapis] Reading bundled API signatures: jdk-deprecated-9
[forbiddenapis] Reading bundled API signatures: jdk-internal-9
[forbiddenapis] Reading bundled API signatures: jdk-system-out
[forbiddenapis] Reading bundled API signatures: jdk-reflection
[forbiddenapis] Loading classes to check...

Up to java 1.8 / 8 it looks:

-check-bundled-signatures:
[forbiddenapis] Reading bundled API signatures: jdk-unsafe-1.8
[forbiddenapis] Reading bundled API signatures: jdk-deprecated-1.8
[forbiddenapis] Reading bundled API signatures: jdk-internal-1.8
[forbiddenapis] Reading bundled API signatures: jdk-system-out
[forbiddenapis] Reading bundled API signatures: jdk-reflection
[forbiddenapis] Loading classes to check...

It is just to accept variants like "1.8" but also "8" or "8.0" as target/source/release version.

@uschindler
Copy link
Member Author

...i also prepared for the new horrible Dockerlike versioning scheme "18.03" / "18.3", coming March next year.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants