Skip to content

Commit a8664fd

Browse files
committed
HV-1591 Create warning log message for improper use of Valid
1 parent 34e0de0 commit a8664fd

File tree

1 file changed

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

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import java.lang.annotation.Annotation;
1313
import java.lang.annotation.ElementType;
1414
import java.lang.invoke.MethodHandles.Lookup;
15+
import java.lang.reflect.AnnotatedParameterizedType;
1516
import java.lang.reflect.Executable;
1617
import java.lang.reflect.Member;
1718
import java.lang.reflect.Type;
@@ -946,4 +947,8 @@ ConstraintDefinitionException getConstraintValidatorDefinitionConstraintMismatch
946947
@LogMessage(level = DEBUG)
947948
@Message(id = 269, value = "Unable to enable secure XML feature processing when loading %1$s: %2$s")
948949
void unableToEnableSecureFeatureProcessingSchemaXml(String fileName, String message);
950+
951+
@LogMessage(level = WARN)
952+
@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")
953+
void deprecatedUseOfValidOnContainer(@FormatWith(ClassObjectFormatter.class) Class<?> valueType, Object context);
949954
}

0 commit comments

Comments
 (0)