-
Notifications
You must be signed in to change notification settings - Fork 359
Support for Java 25 (LTS) #2600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 13 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
aee8454
Increase Java version to 25.
tsaglam 006c378
Set CI workflows to Java 25.
tsaglam 8e14f1f
Update Java version in readme.
tsaglam 0c88dac
Update expected Java version in the Java version test.
tsaglam 0fbba3c
Add Java 25 test resources.
tsaglam 6821fb9
Remove string template test, as it was removed from preview in java 23.
tsaglam 1b4acc5
Fix record builder configuration.
tsaglam 208096c
Fix expected results from Java feature test, remove illegal string sy…
tsaglam 366ca3a
Log tokenization when running the new Java feature test.
tsaglam cc905aa
Adapt test resources.
tsaglam 4c129b4
Add additional test resource for compact source files introduced in J…
tsaglam c2332ea
Fix tokenization of compact source files, which implicitly contain a …
tsaglam 86a78bf
Add Java language module test for compact source files.
tsaglam 3c356a5
Move version properties to parent pom.
tsaglam 73c8eb4
Move CI workflows temporarily to Java 25 early access.
tsaglam 9ce8efc
Revert CI workflows to Java 25 from early access.
tsaglam 5318a67
Merge branch 'develop' into feature/java-25
tsaglam c8707c8
Merge branch 'develop' into feature/java-25
tsaglam f3da8e6
Adapt configuration of AutoService for Java 25
robinmaisch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
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
33 changes: 33 additions & 0 deletions
33
core/src/test/resources/de/jplag/samples/NewJavaFeatures/A/Java25.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| import module java.base; | ||
| import module java.sql; | ||
|
|
||
| public class Java25 { | ||
|
|
||
| // Compact main method | ||
| void main() { | ||
| // Module imports: | ||
| List<String> list = List.of("a", "b", "c"); // java.util.List from java.base is imported | ||
| java.sql.Date date = new java.sql.Date(0); // java.sql.Date from java.sql is imported | ||
|
|
||
| // Unnamed variables: | ||
| int count; | ||
| for (String _ : list) {// loop variable is unused | ||
| count++; | ||
| } | ||
|
|
||
| } | ||
|
|
||
| class Person { | ||
| Person(int age) { | ||
| /* ... */ } | ||
| } | ||
|
|
||
| class Employee extends Person { | ||
| Employee(int age) { | ||
| if (age < 0) | ||
| age = 0; // validate before calling super | ||
| super(age); // now allowed after other statements | ||
| IO.println("Employee age: " + age); | ||
| } | ||
| } | ||
| } |
11 changes: 11 additions & 0 deletions
11
core/src/test/resources/de/jplag/samples/NewJavaFeatures/A/Java25Compact.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import module java.base; | ||
| import module java.sql; | ||
|
|
||
| // Compact main method | ||
| void main() { | ||
| foo(); | ||
| } | ||
|
|
||
| private static void foo() { | ||
| IO.println("Compact source file and main"); | ||
| } |
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
34 changes: 34 additions & 0 deletions
34
core/src/test/resources/de/jplag/samples/NewJavaFeatures/B/Java25.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| import java.util.List; | ||
| import java.sql.Date; | ||
|
|
||
| public class Java25 { | ||
|
|
||
| // No compact main method | ||
| public static void main(String[] args) { | ||
| // No module imports: | ||
| List<String> list = List.of("a", "b", "c"); // java.util.List from java.base is imported | ||
| java.sql.Date date = new java.sql.Date(0); // java.sql.Date from java.sql is imported | ||
|
|
||
| // No unnamed variables: | ||
| int count; | ||
| for (String text : list) {// loop variable is unused | ||
| count++; | ||
| } | ||
|
|
||
| } | ||
|
|
||
| class Person { | ||
| Person(int age) { | ||
| } | ||
| } | ||
|
|
||
| class Employee extends Person { | ||
| Employee(int age) { | ||
| if (age < 0) { | ||
| age = 0; // validate before calling super | ||
| } | ||
| super(age); // now allowed after other statements | ||
| System.out.println("Employee age: " + age); | ||
| } | ||
| } | ||
| } |
14 changes: 14 additions & 0 deletions
14
core/src/test/resources/de/jplag/samples/NewJavaFeatures/B/Java25Compact.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import java.util.List; | ||
| import java.sql.Date; | ||
|
|
||
| public class Java25Compact { | ||
|
|
||
| // No compact main method | ||
| public static void main(String[] args) { | ||
| foo(); | ||
| } | ||
|
|
||
| private static void foo() { | ||
| IO.println("No compact source file and main!"); | ||
| } | ||
| } |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.