- firstLength = BaseConstraints.lengthConstraint(min, firstLength.getMax(), firstLength.getDescription(),
- firstLength.getReference());
+ firstLength = BaseConstraints.newLengthConstraint(min, firstLength.getMax(),
+ Optional.fromNullable(firstLength.getDescription()),
+ Optional.fromNullable(firstLength.getReference()));