bval-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pavel Arnošt (JIRA) <j...@apache.org>
Subject [jira] [Created] (BVAL-168) CharSequence @NotEmpty validation not according to spec
Date Wed, 07 Nov 2018 10:47:00 GMT
Pavel Arnošt created BVAL-168:
---------------------------------

             Summary: CharSequence @NotEmpty validation not according to spec
                 Key: BVAL-168
                 URL: https://issues.apache.org/jira/browse/BVAL-168
             Project: BVal
          Issue Type: Bug
          Components: jsr303
    Affects Versions: 2.0.0
            Reporter: Pavel Arnošt


Hi,

it looks like that CharSequence @NotEmpty validation is not according to spec. Compare:

[https://github.com/apache/bval/blob/master/bval-jsr/src/main/java/org/apache/bval/constraints/NotEmptyValidatorForCharSequence.java]

with:

[https://github.com/hibernate/hibernate-validator/blob/master/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/bv/notempty/NotEmptyValidatorForCharSequence.java]

@NotEmpty javadoc says that "{{The annotated element must not be null nor empty." but NotEmptyValidatorForCharSequence#isValid
returns true for null values.}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message