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

Add validation reason and distinguish between live and batch validation #200

Merged
merged 3 commits into from
Apr 21, 2023

Conversation

planger
Copy link
Member

@planger planger commented Apr 20, 2023

Copy link
Contributor

@tortmayr tortmayr left a comment

Choose a reason for hiding this comment

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

Thanks Philip, support for live validation is definitely a nice feature addition.
I did not have time to test the changes yet and only did a preliminary code review for now.

} else {
markers.addAll(doBatchValidation(element));
}
if (element.getChildren() != null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is a unnecessary null-check. List properties of EObjects are always defined and should never be null. We should rather check if the children list is not empty.


public RequestMarkersAction() {
this(new ArrayList<>());
}

public RequestMarkersAction(final List<String> elementsIDs) {
this(elementsIDs, null);
Copy link
Contributor

Choose a reason for hiding this comment

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

In the client change you mentioned that the default reason is batch. So we should use it here has default value instead of null.


}
String reason = action.getReason() != null ? action.getReason() : MarkersReason.BATCH;
Copy link
Contributor

Choose a reason for hiding this comment

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

See comment above. If the default is already properly set in the action class we don't need to handle it explicitly here.

@planger
Copy link
Member Author

planger commented Apr 21, 2023

Thank you for the excellent review! I've applied your suggestions with b8a020f.

@planger planger requested a review from tortmayr April 21, 2023 07:51
Copy link
Contributor

@tortmayr tortmayr left a comment

Choose a reason for hiding this comment

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

Thanks for the fast update! LGTM 👍🏼

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.

2 participants