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

Fix JDK9 #321

Closed
wants to merge 2 commits into from
Closed

Fix JDK9 #321

wants to merge 2 commits into from

Conversation

csware
Copy link
Contributor

@csware csware commented Feb 2, 2024

This make the build work with JDK9

Another PR for JDK8 is on the way soon if you are interested...

@mikesamuel
Copy link
Contributor

There was a lot of discussion on PR #272 about which version to support and the difference between immutable (unqualified "unmodifiable" in Java SE parlance) and unmodifiable view collections when moving away from Guava's immutable collections.

iirc, the decision to go with JDK 10 (we thought they were 9 which is on me) was that the .of and .copyOf factories recognize each others outputs and so one can pass a collection through multiple layers that defensively copy without incurring the cost of those copies multiple times.

I have no opinion on JDK 9 vs 10. They both are post-modules. I'd be happy to just go straight from JDK6 support in the last release to JDK 10.

@csware
Copy link
Contributor Author

csware commented Feb 2, 2024

For me moving to 10 would be fine, however, apache common mostly still support JDK8. The question is what JDKs are targeted by the users of java-html-sanitizer (cf. #301 (comment))

@csware
Copy link
Contributor Author

csware commented Feb 2, 2024

All my (private) projects are using JDK17, but as a library I suppose you have to swallow a pill and consider JDK8 (until there is enough pressure for everyone to use modern JDKs)...

Signed-off-by: Sven Strickroth <email@cs-ware.de>
For the compiler --release check to work, we need a more recent maven-compiler-plugin version (at least 3.6).

Signed-off-by: Sven Strickroth <email@cs-ware.de>
@csware
Copy link
Contributor Author

csware commented Feb 7, 2024

It would also be possible to implement our own read-only wrapper for Map, Set and List and easily get "one copy", but is it worth this for people who use such old JDKs? Also, the builder shouldn't be used that frequently.

@csware
Copy link
Contributor Author

csware commented Feb 11, 2024

Any news on this?

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

Successfully merging this pull request may close these issues.

None yet

2 participants