Skip to content

HV000151: A method overriding another method must not redefine the parameter constraint configuration #1181

@blaghed

Description

@blaghed

The context

This happens quickly when compiling a project with Spring AOT, not sure if the warning shows up under other situations.

The bug

The GrpcClientConstructorInjectionBeanFactoryPostProcessor class uses the @NotNull constraint on the method signature, but this is not declared by the BeanFactoryPostProcessor parent class.

Stacktrace and logs

[WARN] [main] [] [o.s.v.b.BeanValidationBeanRegistrationAotProcessor] - Skipping validation constraint hint inference for class net.devh.boot.grpc.client.inject.GrpcClientConstructorInjectionBeanFactoryPostProcessor
jakarta.validation.ConstraintDeclarationException: HV000151: A method overriding another method must not redefine the parameter constraint configuration, but method GrpcClientConstructorInjectionBeanFactoryPostProcessor#postProcessBeanFactory(ConfigurableListableBeanFactory) redefines the configuration of BeanFactoryPostProcessor#postProcessBeanFactory(ConfigurableListableBeanFactory).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething does not work as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions