Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6271215

Remove static reference to Random in java.util.Collections

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 6
    • 6
    • core-libs
    • None

      java.util.Collections contains a static java.util.Random reference initialized in Collections' static initializer which causes a significant amount of other initialization code to be run, including sun.misc.AtomicLong's static initializer and some reflection code. Because this Random object is used only in fairly esoteric situations (for java.util.Collections.shuffle(List), this Random object should be initialized lazily. There is no performance improvement to be gained with this change, only a simplification of the bootstrapping sequence of the core libraries.

      ###@###.### 2005-05-16 22:30:16 GMT
      ###@###.### 2005-05-16 22:32:36 GMT

            kbr Kenneth Russell (Inactive)
            kbr Kenneth Russell (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: