Skip to content

Commit 9ff87ef

Browse files
committed
HV-1591 Create warning log message for improper use of Valid
1 parent 090196d commit 9ff87ef

File tree

1 file changed

+4
-0
lines changed
  • engine/src/main/java/org/hibernate/validator/internal/util/logging

1 file changed

+4
-0
lines changed

engine/src/main/java/org/hibernate/validator/internal/util/logging/Log.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -946,4 +946,8 @@ ConstraintDefinitionException getConstraintValidatorDefinitionConstraintMismatch
946946
@LogMessage(level = DEBUG)
947947
@Message(id = 269, value = "Unable to enable secure XML feature processing when loading %1$s: %2$s")
948948
void unableToEnableSecureFeatureProcessingSchemaXml(String fileName, String message);
949+
950+
@LogMessage(level = WARN)
951+
@Message(id = 270, value = "Using `@Valid` on a container (%1$s) is deprecated. You should apply the annotation on the type argument(s). Field name: %2$s")
952+
void deprecatedUseOfValidOnContainer(@FormatWith(ClassObjectFormatter.class) Class<?> valueType, Object context);
949953
}

0 commit comments

Comments
 (0)