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

Unused code in check_nest_attributes function

    XMLWordPrintable

    Details

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

      Description

      From a -Wunused build:

      `src/hotspot/share/prims/jvmtiRedefineClasses.cpp:702:21: warning: unused variable 'state' [-Wunused-variable]` (edited)
        `JvmtiThreadState *state = JvmtiThreadState::state_for((JavaThread*)thread);`


      static jvmtiError check_nest_attributes(InstanceKlass* the_class,
                                              InstanceKlass* scratch_class) {
        // Check whether the class NestHost attribute has been changed.
        Thread* thread = Thread::current();
        ResourceMark rm(thread);
        JvmtiThreadState *state = JvmtiThreadState::state_for((JavaThread*)thread);

      The state variable was leftover from an earlier version of the code that used a RedefineVerifyMark. It is not needed and can be deleted.

        Attachments

          Activity

            People

            Assignee:
            dholmes David Holmes
            Reporter:
            dholmes David Holmes
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: