Uploaded image for project: 'Commons Validator'
  1. Commons Validator
  2. VALIDATOR-444

LongValidator: numbers bigger than the maxvalue are Valid

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.6
    • Fix Version/s: 1.7
    • Component/s: Routines
    • Labels:
      None

      Description

      If you try to validate a Value bigger than 9,223,372,036,854,775,807 it keeps valid.

        for example with:

      LongValidator longValidator = new LongValidator ( true, AbstractNumberValidator.STANDARD_FORMAT );
      longValidator.isValid("9223372036854775808") // is true should be false max long is 9223372036854775807
      

      even worse is that:

       

      longValidator.validate ( "9999999999999999999999999999999999999")
      

      will give you the long maxValue as Result.

      The IntegerValidator will give you null and nonValid. 

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              wurtzelsepp Martin Scholz

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment