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

Tobias Hartmann thartmann at openjdk.java.net
Tue Mar 23 06:45:39 UTC 2021


On Mon, 22 Mar 2021 16:28:25 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> 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 time 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.

Looks good.

-------------

Marked as reviewed by thartmann (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/3127


More information about the hotspot-compiler-dev mailing list