Unused code in check_nest_attributes function

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 12
    • Affects Version/s: 12
    • Component/s: hotspot
    • None
    • b11

      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.

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

              Created:
              Updated:
              Resolved: