Skip to content

Avoid reflecting to obtain validationGroups every time the call is made #32068

@brucelwl

Description

@brucelwl

private Class<?>[] getValidationGroups() {
return ((shouldValidateArguments() || shouldValidateReturnValue()) && this.methodValidator != null ?
this.methodValidator.determineValidationGroups(getBean(), getBridgedMethod()) : EMPTY_GROUPS);
}

can call getValidationGroups() in the InvocableHandlerMethod construction method, and take validationGroups returned by getValidationGroups() method as a member variable. Avoid reflecting to obtain validationGroups every time the call is made

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions