-
Enhancement
-
Resolution: Fixed
-
P4
-
17
-
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.
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.