You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2011/04/19 00:37:05 UTC

[jira] [Created] (VALIDATOR-294) NPE in CodeValidator.validate(null) if RE is null but min or max are not -1

NPE in CodeValidator.validate(null) if RE is null but min or max are not -1
---------------------------------------------------------------------------

                 Key: VALIDATOR-294
                 URL: https://issues.apache.org/jira/browse/VALIDATOR-294
             Project: Commons Validator
          Issue Type: Bug
          Components: Routines
    Affects Versions: 1.3.1 Release
            Reporter: Sebb


The code for the validate() method does not handle all cases of null input correctly.

If there is no RE, but min or max are specified (i.e. not -1), then the code length check fails with an NPE.

Patch and fix to follow.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (VALIDATOR-294) NPE in CodeValidator.validate(null) if RE is null but min or max are not -1

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/VALIDATOR-294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb resolved VALIDATOR-294.
----------------------------

    Resolution: Fixed

> NPE in CodeValidator.validate(null) if RE is null but min or max are not -1
> ---------------------------------------------------------------------------
>
>                 Key: VALIDATOR-294
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-294
>             Project: Commons Validator
>          Issue Type: Bug
>          Components: Routines
>    Affects Versions: 1.3.1 Release
>            Reporter: Sebb
>
> The code for the validate() method does not handle all cases of null input correctly.
> If there is no RE, but min or max are specified (i.e. not -1), then the code length check fails with an NPE.
> Patch and fix to follow.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira