Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 77280 invoked from network); 17 Apr 2010 16:23:54 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 17 Apr 2010 16:23:54 -0000 Received: (qmail 8389 invoked by uid 500); 17 Apr 2010 16:23:54 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 8368 invoked by uid 500); 17 Apr 2010 16:23:54 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 8361 invoked by uid 99); 17 Apr 2010 16:23:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 Apr 2010 16:23:54 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 Apr 2010 16:23:46 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o3HGNP4F013915 for ; Sat, 17 Apr 2010 12:23:25 -0400 (EDT) Message-ID: <6829391.26651271521405113.JavaMail.jira@thor> Date: Sat, 17 Apr 2010 12:23:25 -0400 (EDT) From: "Dinuk Weerasinghe (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-6502) [classlib][luni] String.substring does not throw StringIndexOutOfBoundsException with index In-Reply-To: <1878151.26611271520925182.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ 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