@@ -111,7 +111,8 @@ public interface ProblemBuilder {
111111 ProblemBuilder extension (@ Nullable String name , @ Nullable Object value );
112112
113113 /**
114- * Adds multiple custom extensions from a map.
114+ * Adds multiple custom extensions from a map. If the value of any provided extension is {@code
115+ * null} and an extension with the same key already exists, it will be removed.
115116 *
116117 * @param extensions map of extension keys and values
117118 * @return this builder instance for chaining
@@ -124,7 +125,9 @@ default ProblemBuilder extensions(@Nullable Map<String, ? extends @Nullable Obje
124125 }
125126
126127 /**
127- * Adds single custom extension from {@link Problem.Extension}.
128+ * Adds single custom extension from {@link Problem.Extension}. If the value of the provided
129+ * extension is {@code null} and an extension with the same key already exists, it will be
130+ * removed.
128131 *
129132 * @param extension array of extensions
130133 * @return this builder instance for chaining
@@ -137,7 +140,9 @@ default ProblemBuilder extension(Problem.@Nullable Extension extension) {
137140 }
138141
139142 /**
140- * Adds multiple custom extensions from varargs of {@link Problem.Extension}.
143+ * Adds multiple custom extensions from varargs of {@link Problem.Extension}. If the value of any
144+ * provided extension is {@code null} and an extension with the same key already exists, it will
145+ * be removed.
141146 *
142147 * @param extensions array of extensions
143148 * @return this builder instance for chaining
@@ -154,7 +159,9 @@ default ProblemBuilder extensions(Problem.@Nullable Extension @Nullable ... exte
154159 }
155160
156161 /**
157- * Adds multiple custom extensions from a collection of {@link Problem.Extension}.
162+ * Adds multiple custom extensions from a collection of {@link Problem.Extension}. If the value of
163+ * any provided extension is {@code null} and an extension with the same key already exists, it
164+ * will be removed.
158165 *
159166 * @param extensions collection of extensions
160167 * @return this builder instance for chaining
0 commit comments