Harmony
  1. Harmony
  2. HARMONY-6502

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

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor 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

        Activity

        Dinuk Weerasinghe created issue -
        Dinuk Weerasinghe made changes -
        Field Original Value New Value
        Attachment 6502.patch [ 12442054 ]
        Tim Ellison made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Tim Ellison [ tellison ]
        Fix Version/s 5.0M15 [ 12315054 ]
        Resolution Fixed [ 1 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development