IntelliJ keeps telling me i have to initialize my injected fields. I know a workaround would be to create a ctor and annotate it with @Inject but i dont want to change all of my classes. So is there a way to tell IntelliJ to ignore this error in @Inject fields?
import jakarta.inject.Inject;
import org.eclipse.jdt.annotation.NonNull;
public class Foo {
@NonNull
@Inject
private Bar bar;
}
Under Settings -> Inscpections -> Probable bugs -> Nullability problems -> "@NotNull field is not initialized" there is a checkbox that is called "Ignore fields which could be initialized implicitly" that is checked. But it doesn't work.