Skip to content

Update to Java 23#656

Merged
mewilker merged 9 commits into
mainfrom
645-java-25
Jun 24, 2026
Merged

Update to Java 23#656
mewilker merged 9 commits into
mainfrom
645-java-25

Conversation

@mewilker

@mewilker mewilker commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Overview

Resolves #645 kinda.

Originally I set out to upgrade the autograder to version 25, so that we could support the latest LTS of java possible. The current chess project is set up to run JDK 23, and the current version of the autograder is version 21. Recently, we have seen quite a few students using unamed variables, which was introduced in Java 22. They then push their code to the autograder and it fails to compile.

It turned out that Checkstyle did not support Java 25 language features. This meant that although the autograder could upgrade to Java 25 and run projects using features just fine, it could not run code quality with these features. Checkstyle did support unnamed variables, and claims to be supported by Java 23. Thus, this pull request updates the autograder to that version. This should allow students to use unnamed variables in their code, consistent with the JDK we give them to start the project.

The Dockerfile was updated to use version 25. This is because as far as I could see, it only has builds for LTS versions. Thus, the best version to use was 25.

Details

  • devcontainer now uses version 23
  • tests workflows now use version 23
  • dockerfile now builds with java 25
  • autograder maven pom is set to use 23
  • student injected poms are set to use 23
  • root gitignore includes node_modules (see commit note)
  • updated Mockito dependency

Testing

  • Added/updated unit tests
  • Tested edge cases
  • Manual testing (if needed)

Future Work

Should checkstyle be upgraded to support Java 25, we could make the final leap and upgrade to fully to Java 25. A feature I used to test this was placing code before the super call in a constructor. We would first need to upgrade the Checkstyle repository and then update this one.

@mewilker mewilker requested a review from a team June 23, 2026 00:08
@mewilker mewilker self-assigned this Jun 23, 2026
@mewilker mewilker changed the title 645 java 25 Update to Java 23 Jun 23, 2026

@TwoLettuce TwoLettuce left a comment

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.

Looks like it probably works!

@mewilker mewilker merged commit 7512b28 into main Jun 24, 2026
3 checks passed
@mewilker mewilker deleted the 645-java-25 branch June 24, 2026 22:44
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.

Update the Autograder to Java 25

2 participants