Attempt to rotate a zero-length list fails with ArithmeticException

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 1.4.0
    • Affects Version/s: 1.4.0
    • Component/s: core-libs
    • None
    • beta
    • generic, sparc
    • generic, solaris_2.6
    • Verified

      import java.util.*;

      public class Junk {
          public static void main(String args[]) {
              Collections.rotate(new ArrayList(), 42);
              Collections.rotate(new LinkedList(), 666);
          }
      }

            Assignee:
            Josh Bloch (Inactive)
            Reporter:
            Josh Bloch (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: