harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Beyer (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (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
Date Sat, 11 Apr 2009 16:25:14 GMT

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

Nathan Beyer resolved HARMONY-6122.
-----------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 5.0M9)

Modified version of patch applied at r764215, please verify.

> [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
>            Assignee: Nathan Beyer
>         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.


Mime
View raw message