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

Cache validationGroups for subsequent requests #32078

Closed
wants to merge 1 commit into from

Conversation

quaff
Copy link
Contributor

@quaff quaff commented Jan 22, 2024

Close GH-32068

@brucelwl
Copy link

@quaff Would it be better to initialize validationGroups in method setMethodValidator(@Nullable MethodValidator methodValidator) ?

example code:

public void setMethodValidator(@Nullable MethodValidator methodValidator) {
   this.methodValidator = methodValidator;
   this.validationGroups = getValidationGroups();
}

@jhoeller
Copy link
Contributor

@quaff I eventually went with a non-lazy-init approach as suggested by @brucewl, dropping the getValidationGroups() method completely. Also, applying the same change to the reactive InvocableHandlerMethod variant as well.

@jhoeller jhoeller closed this Jan 23, 2024
@jhoeller jhoeller added status: superseded An issue that has been superseded by another and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: superseded An issue that has been superseded by another
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avoid reflecting to obtain validationGroups every time the call is made
4 participants