Bad assert in SignatureParser class

XMLWordPrintable

    • Type: Bug
    • Resolution: Not an Issue
    • Priority: P5
    • 9
    • Affects Version/s: 7u80, 8-pool, 9
    • Component/s: core-libs

      FULL PRODUCT VERSION :
      java -version
      java version "1.7.0_80"
      Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
      Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      Linux Ubuntu 3.2.0-84-generic #121-Ubuntu SMP Tue May 5 18:54:05 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux


      A DESCRIPTION OF THE PROBLEM :
      Hello,

      The assert should be:
              assert this.index < this.input.length;

      as the max index is (length-1):


      /usr/lib/jvm/java-7-oracle/jre/lib/rt.jar!/sun/reflect/generics/parser/SignatureParser.class

          private char current() {
              assert this.index <= this.input.length;

              try {
                  return this.input[this.index];
              } catch (ArrayIndexOutOfBoundsException var2) {
                  return ':';
              }
          }

      Regards,
      Jay


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Look at source code.

      ACTUAL -
      ArrayIndexOutOfBoundsException

      REPRODUCIBILITY :
      This bug can be reproduced always.

            Assignee:
            Srikanth Adayapalam (Inactive)
            Reporter:
            Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: