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

Adopt cast notation for JavaThread conversions

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 18
    • Fix Version/s: 18
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b03

      Description

      We currently define Thread::as_Java_thread() as an instance method to convert from a Thread* to a JavaThread*. Other Thread conversions have opted for a cast-style approach e.g.

      static WorkerThread::cast(Thread* _this);
      static CompilerThread::cast(Thread* _this);

      we should look at doing JavaThread conversions in the same way for consistency.

      This also helps remove Thread's knowledge of its subtypes from its API.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              gli Guoxiong Li
              Reporter:
              dholmes David Holmes
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: