diff --git a/common/source/java/ch/systemsx/cisd/common/db/DBRestrictions.java b/common/source/java/ch/systemsx/cisd/common/db/DBRestrictions.java index 5d88f0d7f55afd530653980b6a893286c6844a90..03851fe56e20da55fd31bd1a20dcf0483aa144f2 100644 --- a/common/source/java/ch/systemsx/cisd/common/db/DBRestrictions.java +++ b/common/source/java/ch/systemsx/cisd/common/db/DBRestrictions.java @@ -244,6 +244,11 @@ public class DBRestrictions assert restrictions != null : "Illegal table " + tableName; final int maxLength = restrictions.getLength(columnName); checkNotNullConstraint(tableName, columnName, value, restrictions); + if (value == null) + { + // No further check needed here. + return; + } final Set<String> checkedConstraint = restrictions.getCheckedConstaint(columnName); if (checkedConstraint != null && checkedConstraint.contains(value) == false) {