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
Add filter for Records #990
Conversation
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<configuration> | ||
<argLine>--enable-preview</argLine> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity: Why does surefire require this flag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marchof enablement of Preview Features by --enable-preview
flag is required both at compile and at run time - see Preview Language and VM Features (JEP 12), otherwise we'll get
java.lang.UnsupportedClassVersionError: Preview features are not enabled for org/jacoco/core/test/validation/java14/RecordsTest (class file version 58.65535). Try running with '--enable-preview'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, thanks!
Should we also ignore the accessors? |
See #1215 |
I propose to filter methods
toString
,hashCode
andequals
that compiler generates for Records (JEP 359), leaving accessor methods untouched, which is consistent with what we do for Kotlindata class
es.For
Using
java -version
Generation of report
before this change produces
and after