(thread) Deprecate and provide alternative to Thread.getId()

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Not an Issue
    • Priority: P4
    • None
    • Affects Version/s: 6, 7, 7u40, 8
    • Component/s: core-libs
    • None
    • generic
    • generic

      See this discussion thread. http://cs.oswego.edu/pipermail/concurrency-interest/2013-June/011440.html

      The problem is that Thread.getId() can be overridden in subclasses and the value can be altered. Classes such as RecursiveReadersWriterLock (RRWL) depends upon getId() returning a unique value for each Thread. If this doesn't hold, then RRWL will be broken.

      The recommendation is that getId() be deprecated and a new final method be created such as getFinalId(), getImmutableId(), getFirmId(), or getStableId().

            Assignee:
            Alan Bateman
            Reporter:
            Nathan Reynolds
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: