Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4385809

CertPathValidatorException(... int) doc for throwing IndexOutOfBoundsExc is inc

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.4.0
    • security-libs
    • beta
    • sparc
    • solaris_7


      sean.mullan@ireland 2000-11-03

      The constructor for CertPathValidatorException(String, Exception, CertPath, int)
      says:

           * @throws IndexOutofBoundsException if the index is out of range
           * <code>(index < -1 || (certPath != null && index >
           * certPath.getCertificates().size())</code>

      This is incorrect. It should be (note the ">=" instead of ">"):

           * @throws IndexOutofBoundsException if the index is out of range
           * <code>(index < -1 || (certPath != null && index >=
           * certPath.getCertificates().size())</code>

      this is because getCertificates() returns a List and Lists are zero based.
      Implementation/code needs to be fixed as well.

            mullan Sean Mullan
            mullan Sean Mullan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: