Skip to content

Commit f1adf61

Browse files
Ignore nullability warning on public API, annotation can not enforce.
1 parent 44bff12 commit f1adf61

File tree

1 file changed

+3
-0
lines changed
  • objectbox-java/src/main/java/io/objectbox/relation

1 file changed

+3
-0
lines changed

objectbox-java/src/main/java/io/objectbox/relation/ToMany.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,11 @@ public class ToMany<TARGET> implements List<TARGET>, Serializable {
9191
transient private Comparator<TARGET> comparator;
9292

9393
public ToMany(Object sourceEntity, RelationInfo<? extends Object, TARGET> relationInfo) {
94+
//noinspection ConstantConditions Annotation does not enforce non-null.
9495
if (sourceEntity == null) {
9596
throw new IllegalArgumentException("No source entity given (null)");
9697
}
98+
//noinspection ConstantConditions Annotation does not enforce non-null.
9799
if (relationInfo == null) {
98100
throw new IllegalArgumentException("No relation info given (null)");
99101
}
@@ -104,6 +106,7 @@ public ToMany(Object sourceEntity, RelationInfo<? extends Object, TARGET> relati
104106
/** Currently only used for non-persisted entities (id == 0). */
105107
@Experimental
106108
public void setListFactory(ListFactory listFactory) {
109+
//noinspection ConstantConditions Annotation does not enforce non-null.
107110
if (listFactory == null) {
108111
throw new IllegalArgumentException("ListFactory is null");
109112
}

0 commit comments

Comments
 (0)