Skip to content
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

feat: record support in json serializer (#16879) #19258

Merged
merged 5 commits into from
Apr 26, 2024

Conversation

tepi
Copy link
Contributor

@tepi tepi commented Apr 25, 2024

Fixes #16879

Copy link

github-actions bot commented Apr 25, 2024

Test Results

1 099 files  ± 0  1 099 suites  ±0   1h 21m 31s ⏱️ + 1m 5s
6 997 tests + 1  6 947 ✅ + 1  50 💤 ±0  0 ❌ ±0 
7 373 runs  +61  7 311 ✅ +61  62 💤 ±0  0 ❌ ±0 

Results for commit c33a9b5. ± Comparison against base commit ef58049.

♻️ This comment has been updated with latest results.

@tepi
Copy link
Contributor Author

tepi commented Apr 26, 2024

Still need record support in com.vaadin.flow.internal.JsonSerializer#toObject(java.lang.Class<T>, elemental.json.JsonValue) so marking as draft until that is in.

@tepi tepi marked this pull request as draft April 26, 2024 07:02
@tepi tepi marked this pull request as ready for review April 26, 2024 07:57
caalador
caalador previously approved these changes Apr 26, 2024
for (PropertyDescriptor pd : info.getPropertyDescriptors()) {
if ("class".equals(pd.getName())) {
continue;
var type = bean.getClass();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I still don't like var as it obscures the code. Did take 3 looks to get to the end result of Class...
Not that big of an issue now that our min JDK supports it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True. Maybe I'll change those vars since they are not used in this class otherwise.

@tepi tepi enabled auto-merge (squash) April 26, 2024 10:52
Copy link

sonarcloud bot commented Apr 26, 2024

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@tepi tepi merged commit b07ac8e into main Apr 26, 2024
25 of 26 checks passed
@tepi tepi deleted the feat/jsonserializer-record-support branch April 26, 2024 11:07
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.4.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for serialization of record object to Json
4 participants