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

Support Element.setProperty for lists and maps #8587

Merged
merged 1 commit into from
Jun 25, 2020

Conversation

Artur-
Copy link
Member

@Artur- Artur- commented Jun 18, 2020

Fixes #7308

Based on #8584 to avoid unnecessary conflicts

@Artur- Artur- force-pushed the element-setpropertylistmap branch 3 times, most recently from cf5b648 to 77f718d Compare June 22, 2020 06:55
try {
return Json.parse(objectMapper.writeValueAsString(bean));
} catch (JsonProcessingException e) {
throw new RuntimeException("Error converting bean to JSON", e);
Copy link
Collaborator

Choose a reason for hiding this comment

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

MAJOR Define and throw a dedicated exception instead of using a generic one. rule

try {
return Json.instance().parse(objectMapper.writeValueAsString(map));
} catch (JsonProcessingException e) {
throw new RuntimeException("Error converting map to JSON", e);
Copy link
Collaborator

Choose a reason for hiding this comment

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

MAJOR Define and throw a dedicated exception instead of using a generic one. rule

try {
return Json.instance().parse(objectMapper.writeValueAsString(list));
} catch (JsonProcessingException e) {
throw new RuntimeException("Error converting list to JSON", e);
Copy link
Collaborator

Choose a reason for hiding this comment

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

MAJOR Define and throw a dedicated exception instead of using a generic one. rule

@Artur- Artur- force-pushed the element-setpropertylistmap branch from 2ebc53d to c692a2d Compare June 25, 2020 06:52
@joheriks joheriks self-requested a review June 25, 2020 06:53
joheriks
joheriks previously approved these changes Jun 25, 2020
@vaadin-bot
Copy link
Collaborator

SonarQube analysis reported 3 issues

  • MAJOR 3 major

Watch the comments in this conversation to review them.

@Artur- Artur- merged commit 72a4229 into master Jun 25, 2020
@Artur- Artur- deleted the element-setpropertylistmap branch June 25, 2020 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Element.setProperty(String, List<SomeSupportedType>)
3 participants