Suppress varargs warnings

This commit is contained in:
Ilayaperumal Gopinathan
2024-12-18 11:10:53 +00:00
parent 67eee8a43b
commit 7eb201ea17
2 changed files with 3 additions and 2 deletions

View File

@@ -233,7 +233,7 @@ class DefaultFunctionCallbackBuilderTests {
@Test
void whenMethodArgumentTypesIsNullThenThrow() {
assertThatThrownBy(() -> FunctionCallback.builder().method("methodName", null))
assertThatThrownBy(() -> FunctionCallback.builder().method("methodName", (Class<?>[]) null))
.isInstanceOf(IllegalArgumentException.class)
.hasMessage("Argument types must not be null");
}

View File

@@ -52,7 +52,8 @@ class PromptAssertTests {
@Test
void whenPlaceholdersIsNullThenThrow() {
assertThatThrownBy(() -> PromptAssert.templateHasRequiredPlaceholders(new PromptTemplate("{query}"), null))
assertThatThrownBy(
() -> PromptAssert.templateHasRequiredPlaceholders(new PromptTemplate("{query}"), (String[]) null))
.isInstanceOf(IllegalArgumentException.class)
.hasMessageContaining("placeholders cannot be null or empty");
}