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

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

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0M15
    • Component/s: Classlib
    • Labels:
      None
    • Patch Info:
      Patch Available
    • Estimated Complexity:
      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

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: