import jakarta.persistence.*;
@Entity
@org.jspecify.annotations.NullMarked
public class TestEntity {
private String name;
private String extraInfo;
public TestEntity() {} // for JPA
public TestEntity(String name) { this.name = name; }
@Id
public String getName() { return name; }
public void setName(String name) { this.name = name; }
public String getExtraInfo() { return extraInfo; }
public void setExtraInfo(String s) { this.extraInfo = s; }
}
NullAway 0.13.4 correctly warns on the uninitialized non-null field extraInfo, which ought to be @Nullable.
(It also complains about the no-arg constructor, but that's easily fixed with NullAway:ExternalInitAnnotations=jakarta.persistence.Entity.)
NullAway 0.13.6 allows extraInfo to be unannotated, even though it probably isn't set for all objects.
NullAway 0.13.4 correctly warns on the uninitialized non-null field
extraInfo, which ought to be@Nullable.(It also complains about the no-arg constructor, but that's easily fixed with
NullAway:ExternalInitAnnotations=jakarta.persistence.Entity.)NullAway 0.13.6 allows
extraInfoto be unannotated, even though it probably isn't set for all objects.