Skip to content

Commit ff47863

Browse files
author
Xavier Chopin
committed
refactor: use of Assert for consistancy with the project
Signed-off-by: Xavier Chopin <[email protected]>
1 parent 2f5cd0a commit ff47863

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: spring-ai-client-chat/src/main/java/org/springframework/ai/converter/BeanOutputConverter.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
import org.springframework.ai.util.JacksonUtils;
4141
import org.springframework.core.ParameterizedTypeReference;
4242
import org.springframework.lang.NonNull;
43+
import org.springframework.util.Assert;
4344

4445
import static org.springframework.ai.util.LoggingMarkers.SENSITIVE_DATA_MARKER;
4546

@@ -117,7 +118,7 @@ public BeanOutputConverter(ParameterizedTypeReference<T> typeRef, ObjectMapper o
117118
* @param objectMapper Custom object mapper for JSON operations. endings.
118119
*/
119120
private BeanOutputConverter(Type type, ObjectMapper objectMapper) {
120-
Objects.requireNonNull(type, "Type cannot be null");
121+
Assert.notNull(type, "Type cannot be null");
121122
this.type = type;
122123
this.objectMapper = objectMapper != null ? objectMapper : getObjectMapper();
123124
generateSchema();

0 commit comments

Comments
 (0)