BCEscapeAnalyzer::invoke checks target->is_loaded() twice

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 17
    • Affects Version/s: 17
    • Component/s: hotspot
    • b15

      SonarCloud reports: Identical sub-expressions on both sides of operator "&&".

        if (target->is_loaded() && klass->is_loaded()
            && (klass->is_initialized() || (klass->is_interface() && target->holder()->is_initialized()))
            && target->is_loaded()) { // <--- here

      This code was last touched a long ago: https://hg.openjdk.java.net/hsx/hsx25/hotspot/rev/bb33c6fdcf0d#l2.5

      ...and it would seem it went unnoticed that there is already `target->is_loaded()` check in the same condition.

            Assignee:
            Aleksey Shipilev
            Reporter:
            Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: