Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8245302 Upgrade LogRecord to support long thread ids and remove its usage of ThreadLocal
  3. JDK-8247877

Release Note: java.util.logging.LogRecord Updated to Support Long Thread IDs

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: P3
    • Resolution: Delivered
    • Affects Version/s: 16
    • Fix Version/s: 16
    • Component/s: core-libs
    • Labels:

      Description

      In this release, `java.util.logging.LogRecord` has been updated to support long thread ids.

      `LogRecord::getThreadID` and `LogRecord::setThreadID` are deprecated. New accessors, `LogRecord::getLongThreadID` and `LogRecord::setLongThreadID`, are provided and should be used instead.

      The serial field `threadID` has been deprecated and a new serial field `longThreadID` that can support long values has been introduced. The deprecated `threadID` field is kept in the serial form for backward compatibility. Long thread ids that are less than `Integer.MAX_VALUE` are directly mapped to `threadID` and `longThreadID` has the same value. For `longThreadID` greater than Integer.MAX_VALUE, a new negative value for the `int` `threadID` is synthesized by using a deterministic algorithm based on the `longThreadID` hash. The resulting value is guaranteed to be a negative value.

        Attachments

          Activity

            People

            Assignee:
            ryadav Rahul Yadav
            Reporter:
            ryadav Rahul Yadav
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: