I have the following Object
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
public class SomeObject {
@Valid
@NotNull
private int someCount;
public int getSomeCount() {
return someCount;
}
public void setSomeCount(final int someCount) {
this.someCount = someCount;
}
public SomeObject(final int someCount) {
this.someCount = someCount;
}
}
But I get
"someCount" is marked "javax.validation.constraints.NotNull" but is not initialized in this constructor.
and it's pointing to the constructor. I'm passing an item into the constructor. How do I fix this