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

Unused code in check_nest_attributes function

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 12
    • 12
    • hotspot
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: