Strip pre-java-9 version check in Metrics as Velocity targets 21+#1836
Open
WouterGritter wants to merge 4 commits into
Open
Strip pre-java-9 version check in Metrics as Velocity targets 21+#1836WouterGritter wants to merge 4 commits into
Metrics as Velocity targets 21+#1836WouterGritter wants to merge 4 commits into
Conversation
kennytv
previously requested changes
Jul 3, 2026
Member
Author
I'd propose the following refactor: metrics.addCustomChart(new DrilldownPie("java_version", () -> {
Runtime.Version version = Runtime.version();
return Map.of(
"Java " + version.feature(),
Map.of(System.getProperty("java.version"), 1));
}));but it seems a bit odd to mix the old "api" (system property) and the new Runtime.Version API here. Thoughts? Edit: I think it goes without saying that we shouldn't mess up the output to divide bStats metrics after this PR. Edit 2: See latest commit, it's pretty easy to reconstruct the |
… needs the system property to produce the same bStats metrics)
Member
|
Mixing is fine I'd say |
Member
Author
Better than the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As Velocity builds to target java 21, there's really no need to support legacy version parsing.