Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 96906 invoked from network); 20 Mar 2009 03:42:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Mar 2009 03:42:11 -0000 Received: (qmail 56472 invoked by uid 500); 20 Mar 2009 03:42:11 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 56449 invoked by uid 500); 20 Mar 2009 03:42:11 -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 56440 invoked by uid 99); 20 Mar 2009 03:42:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Mar 2009 20:42:11 -0700 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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Mar 2009 03:42:11 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A9271234C003 for ; Thu, 19 Mar 2009 20:41:50 -0700 (PDT) Message-ID: <1816036025.1237520510678.JavaMail.jira@brutus> Date: Thu, 19 Mar 2009 20:41:50 -0700 (PDT) From: "Nathan Beyer (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-6122) [classlib][luni] java.util.Collections.swap(List list, int i, int j) should throw IndexOutOfBoundsException when i equals to j and is also out of boundary In-Reply-To: <2042884342.1237519190469.JavaMail.jira@brutus> 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-6122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12683739#action_12683739 ] Nathan Beyer commented on HARMONY-6122: --------------------------------------- The change isn't obvious to me, can you help be understand it? Please describe what's being tested to determine if the code can return without any change or exception. > [classlib][luni] java.util.Collections.swap(List list, int i, int j) should throw IndexOutOfBoundsException when i equals to j and is also out of boundary > ------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: HARMONY-6122 > URL: https://issues.apache.org/jira/browse/HARMONY-6122 > Project: Harmony > Issue Type: Bug > Components: Classlib > Affects Versions: 5.0M8 > Reporter: Kevin Zhou > Fix For: 5.0M9 > > Attachments: HARMONY-6122.diff > > Original Estimate: 24h > Remaining Estimate: 24h > > Given a test case [1], RI passes while HY fails. > The java spec specifies that java.util.Collections.wap(List list, int i, int j) should throw IndexOutOfBoundsException when either i or j is out of range. > [1] Test Case: > public void test_Collections_swap_IndexOutOfBoundsException() { > try { > Collections.swap(new ArrayList(), 3, 3); > fail("should throw IndexOutOfBoundsException"); > } catch (IndexOutOfBoundsException e) { > // Expected > } > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.