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

Aleksey Shipilev shade at openjdk.java.net
Tue Mar 23 06:57:50 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.

This pull request has now been integrated.

Changeset: 57d8f1d0
Author:    Aleksey Shipilev <shade at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/57d8f1d0
Stats:     2 lines in 1 file changed: 0 ins; 1 del; 1 mod

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

Reviewed-by: kvn, thartmann

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

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


More information about the hotspot-compiler-dev mailing list