harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dinuk Weerasinghe (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-6502) [classlib][luni] String.substring does not throw StringIndexOutOfBoundsException with index
Date Sat, 17 Apr 2010 16:23:25 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-6502?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Dinuk Weerasinghe updated HARMONY-6502:
---------------------------------------

    Attachment: 6502.patch

String.java - Conditional check to validate arguments and throw exception with descriptive
index information

String2Test.java - Test case added to test each branch of the conditional logic pertaining
to change made to substring(int, int) of String.java

> [classlib][luni] String.substring does not throw StringIndexOutOfBoundsException with
index
> -------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6502
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6502
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>            Reporter: Dinuk Weerasinghe
>            Priority: Minor
>         Attachments: 6502.patch
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message