Skip to content

@Valid annotation WARNs on container types #1123

@ricardozanini

Description

@ricardozanini

What happened:
Every build now we can see in the logs:

[WARNING] [org.hibernate.validator.internal.metadata.aggregated.CascadingMetaDataBuilder] HV000271: Using `@Valid` on a container (java.util.Map) is deprecated. You should apply the annotation on the type argument(s). Affected element: additionalProperties
[WARNING] [org.hibernate.validator.internal.metadata.aggregated.CascadingMetaDataBuilder] HV000271: Using `@Valid` on a container (java.util.List) is deprecated. You should apply the annotation on the type argument(s). Affected element: _do
[WARNING] [org.hibernate.validator.internal.metadata.aggregated.CascadingMetaDataBuilder] HV000271: Using `@Valid` on a container (java.util.List) is deprecated. You should apply the annotation on the type argument(s). Affected element: _try

I believe this is a side effect of using Hibernate Validator on our types.

What you expected to happen:
For the build to work without annoying warnings.

How to reproduce it:

Anything else we need to know?:

Environment:

  • Specification version used:

Metadata

Metadata

Assignees

Labels

javaPull requests that update java code

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions