diff --git a/build/build-parent/pom.xml b/build/build-parent/pom.xml
index 5b0345774f8..28f7ca8239c 100644
--- a/build/build-parent/pom.xml
+++ b/build/build-parent/pom.xml
@@ -447,14 +447,11 @@
+ * Unlike the constraint name and group,
+ * the constraint description is unlikely to be used externally as an identifier,
+ * and therefore doesn't need to be URL-friendly, or protected against injection attacks.
*
* @param constraintName shows up in {@link ConstraintMatchTotal} during score justification
- * @param constraintGroup only allows alphanumeric characters, "-" and "_"
+ * @param constraintGroup not used by the solver directly, but may be used by external tools to group constraints together,
+ * such as by their source or by their purpose
*/
- @NonNull
- Constraint asConstraintDescribed(@NonNull String constraintName, @NonNull String constraintDescription,
- @NonNull String constraintGroup);
+ Constraint asConstraintDescribed(String constraintName, String constraintDescription, String constraintGroup);
}
diff --git a/core/src/main/java/ai/timefold/solver/core/api/score/stream/bi/BiConstraintBuilder.java b/core/src/main/java/ai/timefold/solver/core/api/score/stream/bi/BiConstraintBuilder.java
index 29d352124f1..1c05aeee2bd 100644
--- a/core/src/main/java/ai/timefold/solver/core/api/score/stream/bi/BiConstraintBuilder.java
+++ b/core/src/main/java/ai/timefold/solver/core/api/score/stream/bi/BiConstraintBuilder.java
@@ -12,7 +12,7 @@
import ai.timefold.solver.core.api.score.stream.ConstraintBuilder;
import ai.timefold.solver.core.api.score.stream.ConstraintJustification;
-import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.NullMarked;
/**
* Used to build a {@link Constraint} out of a {@link BiConstraintStream}, applying optional configuration.
@@ -25,6 +25,7 @@
* Unless {@link #indictWith(BiFunction)} is called, the default indicted objects' mapping will be used.
* The function takes the input arguments and converts them into a {@link java.util.List}.
*/
+@NullMarked
public interface BiConstraintBuilder> extends ConstraintBuilder {
/**
@@ -33,9 +34,8 @@ public interface BiConstraintBuilder> extends
* @see ConstraintMatch
* @return this
*/
- @NonNull