Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-6502

[classlib][luni] String.substring does not throw StringIndexOutOfBoundsException with index

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 5.0M15
    • Classlib
    • None
    • Patch Available
    • Novice

    Description

      Invocation of String.substring with invalid arguments does not provide the invalid index information

      e.g:

      • "HelloWorld".substring(4,1) on RI gives: java.lang.StringIndexOutOfBoundsException: String index out of range: -3
      • "HelloWorld".substring(4,1) on Harmony gives: java.lang.StringIndexOutOfBoundsException with no message, which is less useful

      Attachments

        1. ASF.LICENSE.NOT.GRANTED--6502.patch
          2 kB
          Dinuk Weerasinghe

        Activity

          People

            tellison Tim Ellison
            kunid Dinuk Weerasinghe
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: