[hibernate-issues] [Hibernate-JIRA] Created: (HV-382) "java.lang.NoSuchMethodError: java.lang.String.isEmpty" in ScriptAssertValidator.java

Jose David Barrio (JIRA) noreply at atlassian.com
Tue Oct 5 08:36:00 EDT 2010


"java.lang.NoSuchMethodError: java.lang.String.isEmpty" in ScriptAssertValidator.java
-------------------------------------------------------------------------------------

                 Key: HV-382
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-382
             Project: Hibernate Validator
          Issue Type: Bug
          Components: validators
    Affects Versions: 4.1.0.Final
         Environment: Hibernate 3.5.3-Final
Hibernate Annotations 3.5.3-Final
Hibernate Commons Annotations 3.2.0.Final
Hibernate Validator 4.1.0.Final
Bytecode provider name : javassist


RDBMS: Oracle, version: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, Oracle Label Security, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production

JDBC driver: Oracle JDBC driver, version: 10.1.0.5.0


            Reporter: Jose David Barrio
            Assignee: Hardy Ferentschik


The annotation '@ScriptAssert' created under HV-292 doesn't work under Java 5, it requieres Java 6.

The reason is that the file "hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/ScriptAssertValidator.java" (http://anonsvn.jboss.org/repos/hibernate/validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/constraints/impl/ScriptAssertValidator.java) makes use of 'java.lang.String.isEmpty()' method to validate that fields 'script', 'lang' and 'alias' are not empty. It should by changed to 'java.lang.String.length()' like other annotations do.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list