You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by "George Harley (JIRA)" <ji...@apache.org> on 2006/01/28 20:01:33 UTC

[jira] Commented: (HARMONY-20) java.util.Collections rotate() gives incorrect result with distance parameter of min possible integer value

    [ http://issues.apache.org/jira/browse/HARMONY-20?page=comments#action_12364331 ] 

George Harley commented on HARMONY-20:
--------------------------------------

Yep, fixed. 

Thanks Tim.


> java.util.Collections rotate() gives incorrect result with distance parameter of min possible integer value
> -----------------------------------------------------------------------------------------------------------
>
>          Key: HARMONY-20
>          URL: http://issues.apache.org/jira/browse/HARMONY-20
>      Project: Harmony
>         Type: Bug
>   Components: Classlib
>  Environment: All
>     Reporter: George Harley
>     Assignee: Tim Ellison
>     Priority: Minor

>
> This unit test fails against the contribution. 
> 	public void testRotateListByMinInteger() {
> 		List list = new ArrayList();
> 		list.add(0, "zero");
> 		list.add(1, "one");
> 		list.add(2, "two");
> 		list.add(3, "three");
> 		list.add(4, "four");
> 		Collections.rotate(list, Integer.MIN_VALUE);
> 		assertEquals("Rotated incorrectly at position 0, ", "three",
> 				(String) list.get(0));
> 		assertEquals("Rotated incorrectly at position 1, ", "four",
> 				(String) list.get(1));
> 		assertEquals("Rotated incorrectly at position 2, ", "zero",
> 				(String) list.get(2));
> 		assertEquals("Rotated incorrectly at position 3, ", "one",
> 				(String) list.get(3));
> 		assertEquals("Rotated incorrectly at position 4, ", "two",
> 				(String) list.get(4));
> 	}

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