Skip to content

Implement Java 25 Phase 1 upgrades: Module imports and flexible constructor bodies#238

Open
Copilot wants to merge 5 commits intomainfrom
copilot/implement-phase-1-2
Open

Implement Java 25 Phase 1 upgrades: Module imports and flexible constructor bodies#238
Copilot wants to merge 5 commits intomainfrom
copilot/implement-phase-1-2

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 11, 2026

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:

// Before
import java.time.Duration;
import java.util.*;
import java.util.concurrent.*;
import java.util.function.BiFunction;
import java.util.stream.IntStream;

// After
import module java.base;

Files updated:

  • AkcesAggregateController
  • AkcesDatabaseModelController
  • AkcesQueryModelController
  • AkcesClientController
  • EventCatalogProcessor

Flexible Constructor Bodies (JEP 513)

Applied flexible constructor bodies only to CommandSendingFailedException where it provides meaningful benefit. Initial changes to UnknownSchemaException and SchemaNotBackwardsCompatibleException were reverted as they only extracted simple expressions without adding value.

Files updated:

  • CommandSendingFailedException

Phase 2 Status

JEP 468 (Derived Record State with with expressions) 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.

Copilot AI and others added 3 commits February 11, 2026 12:51
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
Copilot AI requested a review from jwijgerd February 11, 2026 13:08
@jwijgerd jwijgerd marked this pull request as ready for review February 11, 2026 13:09
Copy link
Copy Markdown
Contributor

@jwijgerd jwijgerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot fix review comments


public UnknownSchemaException(@Nonnull Class<? extends Command> commandClass, String schemaIdentifier) {
super(commandClass, commandClass.getAnnotation(CommandInfo.class), "Unknown Schema " + schemaIdentifier);
CommandInfo commandInfo = commandClass.getAnnotation(CommandInfo.class);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this makes no sense, revert to old situation

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this makes no sense, revert to previous situation

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 13, 2026

@copilot fix review comments

Review comments fixed in commit 64752b6. Reverted the unnecessary flexible constructor body changes in UnknownSchemaException and SchemaNotBackwardsCompatibleException.

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.

2 participants