-
Notifications
You must be signed in to change notification settings - Fork 42
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
Support for record
#183
Comments
The Java 17 LTS release further pushes people towards records. Have you ever heard anything about this topic from anyone, @mkarg ? |
@winne42 I am not aware of any information besides what you can read on this page. |
Thanks @mkarg , sad... |
@winne42 feel free to propose a solution you want to see |
some news on this? I expected this to work.
Here are some more of my thoughts on this topic: Instantiating Classes vs RecordsThe main difference to the current implementations is the processing order. Classes/beans could be creates using the default no args Constructor and then setting the values using fields or methods. Records must be creates using the Constructor that describes every single attribute. So you need to hold all needed elements for an record in cache until you can construct the record with these elements. Java 16++Records are a Feature of Java 16 you have to find a way to handle language features. This POC shows a way to
Jaxb Features@xmlelement - name, defaultValue, required, nillable, typeThe
@xmlelement - factoryMethod, factoryClass
@XmlElementWrapper and @XmlJavaTypeAdapterthere are no implications that avoid the handling of
@XmlAccessorTypeRecord do not have an any setters and fields that are setable. Just arguments of an constructor and method to get access to the value of the RecordComponent. |
what are the steps that must be done to bring this forward? |
Basing on the great research results already posted above, identify the items to actually get changed in the API, JavaDoc, and TCK. Provide a PR implementing your propsal. Discuss the PR with the committers. If a majority is convinced to implement the needed changes in their products, the PR will pass. :-) Note that the EF actually likes to have a working product first before fixing the API, so it might sense to get one of the vendors into your boat, e. g. by adding a PR to a JAXB implementation, proving that your ideas will work in an actual product. :-) |
FYI: I am pretty sure someone else from the jaxb-ri team could do it much better! |
Classes using JAX-B annotations can't be refactored right now. jakartaee/jaxb-api#183
Classes using JAX-B annotations can't be refactored right now. jakartaee/jaxb-api#183
any progrss? |
With the release of Java 16 in March 2021 the broad use of the
record
keyword is expected to grow.I'd like to propose that the JAXB API clearly defines if and how the
record
keyword is supported by JAXB:The text was updated successfully, but these errors were encountered: