Skip to content

Supported Java version for input source code? (3.0.4) #697

Answered by tsantalis
AM307 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello Andre,

Indeed, we added support for matching Record declarations, but when the compiler options are set to Java 20,
record is considered a Java keyword.
Therefore, if some older java code (i.e., before records were introduced in Java) contains a variable named record
the Eclipse JDT parser will skip parsing this code (when set to Java 20 compatibility).

As a result, we decided to go back to the original configuration options, as we had some failing tests.

A proper solution would be to somehow detect the Java version for each commit and setup dynamically the compiler options.
However, this is not so easy. If you have any solution to suggest, I would be glad to hear it and implement it.

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@AM307
Comment options

@tsantalis
Comment options

Answer selected by AM307
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@AM307
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants