Remove static reference to Random in java.util.Collections

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 6
    • Affects Version/s: 6
    • Component/s: 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

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: