Implement Java 25 Phase 1 upgrades: Module imports and flexible constructor bodies#238
Open
Implement Java 25 Phase 1 upgrades: Module imports and flexible constructor bodies#238
Conversation
Co-authored-by: jwijgerd <914840+jwijgerd@users.noreply.github.com>
… 2 as JEP 468 not available Co-authored-by: jwijgerd <914840+jwijgerd@users.noreply.github.com>
Co-authored-by: jwijgerd <914840+jwijgerd@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement Phase 1 and 2 of Java 25 Upgrade Opportunities
Implement Java 25 Phase 1 upgrades: Module imports and flexible constructor bodies
Feb 11, 2026
jwijgerd
requested changes
Feb 13, 2026
|
|
||
| public UnknownSchemaException(@Nonnull Class<? extends Command> commandClass, String schemaIdentifier) { | ||
| super(commandClass, commandClass.getAnnotation(CommandInfo.class), "Unknown Schema " + schemaIdentifier); | ||
| CommandInfo commandInfo = commandClass.getAnnotation(CommandInfo.class); |
Contributor
There was a problem hiding this comment.
this makes no sense, revert to old situation
Contributor
Author
There was a problem hiding this comment.
Reverted to original. The flexible constructor body change didn't provide any meaningful benefit here. (64752b6)
| Class<?> implementationClass, | ||
| List<Difference> differences) { | ||
| super("Schema not backwards compatible with previous version: " + previousSchemaVersion, schemaIdentifier, implementationClass); | ||
| String message = "Schema not backwards compatible with previous version: " + previousSchemaVersion; |
Contributor
There was a problem hiding this comment.
this makes no sense, revert to previous situation
Contributor
Author
There was a problem hiding this comment.
Reverted to original. The flexible constructor body change didn't provide any meaningful benefit here. (64752b6)
…d SchemaNotBackwardsCompatibleException Co-authored-by: jwijgerd <914840+jwijgerd@users.noreply.github.com>
Contributor
Author
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.
Implements Phase 1 of the Java 25 upgrade plan: Module Import Declarations (JEP 494/511) and Flexible Constructor Bodies (JEP 492/513). Phase 2 (Derived Record State/JEP 468) remains unimplemented as the feature is not yet available in Java 25.
Module Import Declarations (JEP 511)
Replaced verbose java.* imports with module imports in 5 controller classes:
Files updated:
AkcesAggregateControllerAkcesDatabaseModelControllerAkcesQueryModelControllerAkcesClientControllerEventCatalogProcessorFlexible Constructor Bodies (JEP 513)
Applied flexible constructor bodies only to
CommandSendingFailedExceptionwhere it provides meaningful benefit. Initial changes toUnknownSchemaExceptionandSchemaNotBackwardsCompatibleExceptionwere reverted as they only extracted simple expressions without adding value.Files updated:
CommandSendingFailedExceptionPhase 2 Status
JEP 468 (Derived Record State with
withexpressions) is not available in Java 25—still in Candidate status. Deferred to future Java version.💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.