Skip to content

Commit 7eb201e

Browse files
committed
Suppress varargs warnings
1 parent 67eee8a commit 7eb201e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

spring-ai-core/src/test/java/org/springframework/ai/model/function/DefaultFunctionCallbackBuilderTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ void whenMethodNameIsNullThenThrow() {
233233

234234
@Test
235235
void whenMethodArgumentTypesIsNullThenThrow() {
236-
assertThatThrownBy(() -> FunctionCallback.builder().method("methodName", null))
236+
assertThatThrownBy(() -> FunctionCallback.builder().method("methodName", (Class<?>[]) null))
237237
.isInstanceOf(IllegalArgumentException.class)
238238
.hasMessage("Argument types must not be null");
239239
}

spring-ai-core/src/test/java/org/springframework/ai/util/PromptAssertTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ void whenPromptTemplateIsNullThenThrow() {
5252

5353
@Test
5454
void whenPlaceholdersIsNullThenThrow() {
55-
assertThatThrownBy(() -> PromptAssert.templateHasRequiredPlaceholders(new PromptTemplate("{query}"), null))
55+
assertThatThrownBy(
56+
() -> PromptAssert.templateHasRequiredPlaceholders(new PromptTemplate("{query}"), (String[]) null))
5657
.isInstanceOf(IllegalArgumentException.class)
5758
.hasMessageContaining("placeholders cannot be null or empty");
5859
}

0 commit comments

Comments
 (0)