-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 support for Java 16 records #829
Comments
Fixes square#829 Signed-off-by: liach <liach@users.noreply.github.com>
Fixes square#829 Signed-off-by: liach <liach@users.noreply.github.com>
I am taking a crack at a PR that would add record support. However, after forking and doing a fresh build/test, I'm seeing two tests fail in IntelliJ (when running through the IDE, not in Maven). ClassNameTest::classNameFromTypeElementDoesntUseGetKind fails:
and ParameterSpecTest::parameterVariableElement fails:
Is this expected? |
@rbair23 It looks like the latter can be fixed by replacing .isEqualTo("java.lang.String arg0"); with .isEqualTo("java.lang.String bar"); It's not clear to me yet what causes the other one. |
Java 16 has added support for records under JEP 395, of the form.
It would be great to support these in JavaPoet, as among other things, they significantly reduce boilerplate.
The text was updated successfully, but these errors were encountered: