rewrite-static-analysis icon indicating copy to clipboard operation
rewrite-static-analysis copied to clipboard

org.openrewrite.staticanalysis.AvoidBoxedBooleanExpressions does not understand @NonNull annotations

Open blipper opened this issue 4 months ago • 1 comments

What is the smallest, simplest way to reproduce the problem?

import lombok.@NonNull

class A {
    void foo(@NonNull Boolean b) {
        if(b) {
        }
}

What did you expect to see?

import lombok.@NonNull

class A {
    void foo(@NonNull Boolean b) {
        if(b) {
        }
}

What did you see instead?

import lombok.@NonNull

class A {
    void foo(@NonNull Boolean b) {
        if(Boolean.TRUE.equals(b)) {
        }
}

What is the full stack trace of any errors you encountered?

stacktrace output here

Are you interested in contributing a fix to OpenRewrite?

blipper avatar Oct 02 '24 18:10 blipper