You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The error message should be correctly constructed without null add to path
Actual Behaviour
When building the message, the path is append in the beginning to add context.
But if last node (type = BEAN) is undefined (name is null), we have a message "my_class.null: my_message"
Steps To Reproduce
Create an annotation @Toto
@Documented@Target({ TYPE })
@Retention(RUNTIME)
@Constraint(validatedBy = { TotoValidator.class })
public @interface Toto {
}
See in ConstraintExceptionHandler that the last node used for building message will return null for the name leading to message ""myClass.null: my_message"
Environment Information
OS: MacOS 13.6.3
JDK: Java 17 Temurin
Example Application
No response
Version
4.2.0
The text was updated successfully, but these errors were encountered:
FYI, in the ConstraintValidator, context.currentPath.nodes[2] (ValidationPath$DefaultBeanNode) already have its name as null
FrogDevelopper
changed the title
ConstraintExceptionHandler should not skip null node when building message
ConstraintExceptionHandler should skip null node when building message
Jan 26, 2024
Expected Behavior
The error message should be correctly constructed without
null
add to pathActual Behaviour
When building the message, the path is append in the beginning to add context.
But if last node (type = BEAN) is undefined (name is
null
), we have a message "my_class.null: my_message"Steps To Reproduce
@Toto
ConstraintExceptionHandler
that the last node used for building message will return null for the name leading to message ""myClass.null: my_message"Environment Information
Example Application
No response
Version
4.2.0
The text was updated successfully, but these errors were encountered: