As a heads up, it looks like wiremock will not be providing explicit support for Java 21 in their 2.x series, and won't be supporting Java 8 in their (as yet unreleased) 3.x series. See https://github.com/orgs/wiremock/projects/5 for details.
I don't think we'll have issues using their 2.x series with Java 21, but I wanted to bring it up for when we add Java 21 to the build system. Just in case it consistently fails.
Anyway, other features in newer Java versions that I discovered when reviewing a PR on GitHub:
Predicate.not (Java 11)
Math.clamp (Java 21, not Java 17, so we still wouldn't be able to use it; we an the equivalent in Utils)
Beyond that, it looks like I might have to correct myself.
In comment:133, I said "I don't think record by itself will be a significant memory reduction", but a JDK developer did some benchmarks which show (minimally) a CPU speed increase. I would anticipate that this is due to "constant folding of instance fields", but the JVM might be doing some other optimizations due to being able to "trust" the record classes.
As a side note, Java 21 is being released in 5 days.
Do we want to move all of our installers to Java 21 once that happens, or do we want to wait a month or so?
Additional notes:
- Most URL constructors are deprecated (do we want to move everything over to URI, keeping URL methods for legacy reasons?)
- SecurityManager is deprecated -- its removal will fix a whole class of bugs with respect to OpenWebStart