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

java.lang.IndexOutOfBoundsException in UrlValidator.isValid()

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Not A Bug
    • Affects Version/s: 1.5.1
    • Fix Version/s: None
    • Component/s: Routines
    • Labels:
      None

      Description

      String[] schemes =

      {"http","https"}

      ;
      UrlValidator validator = new UrlValidator(schemes);
      validator.isValid("http://aaaaa aaaaa aaaaa aaaaa aaa’aa aaaaa aaaaa aaaaa aaaaa aaaaa aaaaa aaaaa aaaaa aaaaa aaaaa aaaaa aaaaa aaaaa aaaaa aaaaa aaaaa aaaaa aaaaa aaaaa aaaaa aaaaa aaaaa aaaaa aaaaa aaaaa aaaaa aaaaa aaaaa aaaaa aaaaa aaaaa aaaaa aaaaa aaaaa aaaaa aaaaa aaaaa aaaaa");

      causes :

      Exception in thread "main" java.lang.IndexOutOfBoundsException
      at sun.net.idn.Punycode.encode(Punycode.java:188)
      at java.net.IDN.toASCIIInternal(IDN.java:320)
      at java.net.IDN.toASCII(IDN.java:122)
      at java.net.IDN.toASCII(IDN.java:151)
      at org.apache.commons.validator.routines.DomainValidator.unicodeToASCII(DomainValidator.java:1764)
      at org.apache.commons.validator.routines.UrlValidator.isValidAuthority(UrlValidator.java:389)
      at org.apache.commons.validator.routines.UrlValidator.isValid(UrlValidator.java:323)
      at testBloom.TestBloom.main(TestBloom.java:153)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Gerard Bouchar Gerard Bouchar
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: