Skip to content

chore: run tests with Java 25#6651

Draft
SirYwell wants to merge 2 commits intomasterfrom
chore/j25
Draft

chore: run tests with Java 25#6651
SirYwell wants to merge 2 commits intomasterfrom
chore/j25

Conversation

@SirYwell
Copy link
Copy Markdown
Collaborator

We are currently not running tests using Java 25. Let's change that.

@seintur
Copy link
Copy Markdown
Contributor

seintur commented Mar 27, 2026

Hi,

It seems that JDT with compliance level 25 parses FooCasper strangely. Maybe the 4 slash symbols at line 5 of FooCasper.java are confused with a javadoc markdown comment?

Anyway, since this is not the main focus of the PR, I guess that we can live with a regular // line comment on line 5.

The following patch makes LinesTest.testCompileWhenUsingLinesArgument pass.

--- a/src/test/java/spoon/test/prettyprinter/testclasses/FooCasper.java	(revision f77e0ad8f92be6bbf9b667a32296209d0f1478a9)
+++ b/src/test/java/spoon/test/prettyprinter/testclasses/FooCasper.java	(date 1774625574058)
@@ -2,7 +2,7 @@
 
 public class FooCasper {
     //	public static void main(String[] args) {
-////		new FooCasper().selfTest();
+//		new FooCasper().selfTest();
 //	}
     FooCasper f;

@I-Al-Istannen
Copy link
Copy Markdown
Collaborator

Sounds fine to paper over it for now, I think

@SirYwell
Copy link
Copy Markdown
Collaborator Author

Hi,

It seems that JDT with compliance level 25 parses FooCasper strangely. Maybe the 4 slash symbols at line 5 of FooCasper.java are confused with a javadoc markdown comment?

Anyway, since this is not the main focus of the PR, I guess that we can live with a regular // line comment on line 5.

The following patch makes LinesTest.testCompileWhenUsingLinesArgument pass.

--- a/src/test/java/spoon/test/prettyprinter/testclasses/FooCasper.java	(revision f77e0ad8f92be6bbf9b667a32296209d0f1478a9)
+++ b/src/test/java/spoon/test/prettyprinter/testclasses/FooCasper.java	(date 1774625574058)
@@ -2,7 +2,7 @@
 
 public class FooCasper {
     //	public static void main(String[] args) {
-////		new FooCasper().selfTest();
+//		new FooCasper().selfTest();
 //	}
     FooCasper f;

The problem is indeed that //// ... is a markdown comment, but we currently recognize it as a javadoc comment, and therefore print it incorrectly. @MartinWitt was looking into markdown comment support, depending on his progress it might make sense to just wait, otherwise we can adjust the test though.

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