-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
1.4.0
-
sparc
-
solaris_2.6
Name: auR10023 Date: 01/03/2001
java.util.Collections.rotate(List,int) incorrectly raises ArithmeticException
with an empty list.
Here is the example:
------t.java-----
import java.util.*;
public class t {
public static void main(String[] args){
Vector v = new Vector();
Collections.rotate(v,1);
}
}
----output:----
Exception in thread "main" java.lang.ArithmeticException: / by zero
at java.util.Collections.rotate1(Collections.java:719)
at java.util.Collections.rotate(Collections.java:712)
at t.main(t.java:6)
======================================================================
- duplicates
-
JDK-4389747 Attempt to rotate a zero-length list fails with ArithmeticException
- Closed