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

Simplify ClassFileParser::parse_super_class

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 26
    • None
    • hotspot
    • master

      This function has an optimization

      https://github.com/openjdk/jdk/blob/2427c901b31dbdccc6f8f39404875a0140460479/src/hotspot/share/classfile/classFileParser.cpp#L3827

          if (cp->tag_at(super_class_index).is_klass()) {
            super_klass = InstanceKlass::cast(cp->resolved_klass_at(super_class_index));

      But this case is never reached, because we are very early in class file parsing and no classes in the CP should have been resolved in the CP at this point.

      This check should be removed.

            iklam Ioi Lam
            iklam Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: