Skip to content

Make determination of execution environment compliance generic#750

Merged
iloveeclipse merged 1 commit intoeclipse-jdt:masterfrom
laeubi:make_version_generic
Jul 30, 2025
Merged

Make determination of execution environment compliance generic#750
iloveeclipse merged 1 commit intoeclipse-jdt:masterfrom
laeubi:make_version_generic

Conversation

@laeubi
Copy link
Copy Markdown
Contributor

@laeubi laeubi commented Jul 29, 2025

Currently one needs to add a new if for each new java version while the value is only matched against the number in the string.

This now uses a pattern and check the result is larger than Java 1.8 version and then returns the number as a string so it automatically adapt to new java versions.

Currently one needs to add a new if for each new java version while the
value is only matched against the number in the string.

This now uses a pattern and check the result is larger than Java 1.8
version and then returns the number as a string so it automatically
adapt to new java versions.
@stephan-herrmann
Copy link
Copy Markdown
Contributor

stephan-herrmann commented Jul 29, 2025

From all that I can see, this will only facilitate future maintenance, it doesn't add any new capability, right?
Note that this particular method is exclusively used for sorting EE entries.

@laeubi
Copy link
Copy Markdown
Contributor Author

laeubi commented Jul 30, 2025

From all that I can see, this will only facilitate future maintenance, it doesn't add any new capability, right?

Yes it should just prevent from adding more and more if cases for each Java version. Beside that before if it can not match any version Java 1.3 was returned (even though that is already checked before) what seems wrong or at least questionable, maybe the intend was to then use the lowest supported version (what would be 1.8 these days) but for new versions it seems really odd.

Now if not a version can extracted and none of the versions match 1.0 is returned, what should never be hit anyways as we just have a generic pattern.

Note that this particular method is exclusively used for sorting EE entries.

At least it is important for PDE and completely breaks the resolution of JVM packages see for example here for Java 23:

and the same happened just yesterday with Java 25:

because new java versions are added regularly I think it is valuable to reduce the amount of required manual changes as low as possible (at best one would only need to add support in compiler).

@iloveeclipse iloveeclipse merged commit 9efbd89 into eclipse-jdt:master Jul 30, 2025
13 checks passed
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.

3 participants