Fixing miscellaneous checkstyle errors

Enabling checkstyle by default in the project build

Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
This commit is contained in:
Soby Chacko
2025-05-14 20:34:27 -04:00
committed by Ilayaperumal Gopinathan
parent 31feb4319b
commit 368be3a04f
218 changed files with 1281 additions and 1080 deletions

View File

@@ -51,7 +51,7 @@ import org.springframework.context.annotation.Primary;
import org.springframework.jdbc.core.JdbcTemplate;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertThrows;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
/**
@@ -147,9 +147,8 @@ public class PgVectorStoreAutoTruncationIT {
Document massiveDocument = new Document(massiveContent);
// This should throw an exception as it exceeds our configured limit
assertThrows(IllegalArgumentException.class, () -> {
batchingStrategy.batch(List.of(massiveDocument));
});
assertThatThrownBy(() -> batchingStrategy.batch(List.of(massiveDocument)))
.isInstanceOf(IllegalArgumentException.class);
dropTable(context);
});

View File

@@ -79,7 +79,7 @@ public class PgVectorStoreVectorStoreChatMemoryAdvisorIT {
.of(new Document("Hello from memory", java.util.Map.of("conversationId", conversationId))));
// Build ChatClient with VectorStoreChatMemoryAdvisor
ChatClient chatClient = ChatClient.builder(chatModel)
ChatClient chatClient = ChatClient.builder(this.chatModel)
.defaultAdvisors(VectorStoreChatMemoryAdvisor.builder(store).build())
.build();
@@ -117,7 +117,7 @@ public class PgVectorStoreVectorStoreChatMemoryAdvisorIT {
java.util.Map.of("conversationId", conversationId)),
new Document("Dogs are loyal pets.", java.util.Map.of("conversationId", conversationId))));
ChatClient chatClient = ChatClient.builder(chatModel)
ChatClient chatClient = ChatClient.builder(this.chatModel)
.defaultAdvisors(VectorStoreChatMemoryAdvisor.builder(store).defaultTopK(1).build())
.build();
@@ -153,7 +153,7 @@ public class PgVectorStoreVectorStoreChatMemoryAdvisorIT {
store.add(java.util.List
.of(new Document("Automobiles are fast.", java.util.Map.of("conversationId", conversationId))));
ChatClient chatClient = ChatClient.builder(chatModel)
ChatClient chatClient = ChatClient.builder(this.chatModel)
.defaultAdvisors(VectorStoreChatMemoryAdvisor.builder(store).defaultTopK(1).build())
.build();
@@ -185,7 +185,7 @@ public class PgVectorStoreVectorStoreChatMemoryAdvisorIT {
new Document("The capital of Italy is Rome.", java.util.Map.of("conversationId", conversationId)),
new Document("Bananas are yellow.", java.util.Map.of("conversationId", conversationId))));
ChatClient chatClient = ChatClient.builder(chatModel)
ChatClient chatClient = ChatClient.builder(this.chatModel)
.defaultAdvisors(VectorStoreChatMemoryAdvisor.builder(store).defaultTopK(2).build())
.build();
@@ -219,7 +219,7 @@ public class PgVectorStoreVectorStoreChatMemoryAdvisorIT {
java.util.Map.of("conversationId", conversationId)),
new Document("Dogs are loyal pets.", java.util.Map.of("conversationId", conversationId))));
ChatClient chatClient = ChatClient.builder(chatModel)
ChatClient chatClient = ChatClient.builder(this.chatModel)
.defaultAdvisors(VectorStoreChatMemoryAdvisor.builder(store).defaultTopK(1).build())
.build();
@@ -250,7 +250,7 @@ public class PgVectorStoreVectorStoreChatMemoryAdvisorIT {
store.add(java.util.List.of(new Document("The quick brown fox jumps over the lazy dog.",
java.util.Map.of("conversationId", conversationId))));
ChatClient chatClient = ChatClient.builder(chatModel)
ChatClient chatClient = ChatClient.builder(this.chatModel)
.defaultAdvisors(VectorStoreChatMemoryAdvisor.builder(store).defaultTopK(1).build())
.build();
@@ -282,7 +282,7 @@ public class PgVectorStoreVectorStoreChatMemoryAdvisorIT {
new Document("Strawberries are also red.", java.util.Map.of("conversationId", conversationId)),
new Document("Bananas are yellow.", java.util.Map.of("conversationId", conversationId))));
ChatClient chatClient = ChatClient.builder(chatModel)
ChatClient chatClient = ChatClient.builder(this.chatModel)
.defaultAdvisors(VectorStoreChatMemoryAdvisor.builder(store).defaultTopK(2).build())
.build();
@@ -314,7 +314,7 @@ public class PgVectorStoreVectorStoreChatMemoryAdvisorIT {
store.add(java.util.List
.of(new Document("The sun is a star.", java.util.Map.of("conversationId", conversationId))));
ChatClient chatClient = ChatClient.builder(chatModel)
ChatClient chatClient = ChatClient.builder(this.chatModel)
.defaultAdvisors(VectorStoreChatMemoryAdvisor.builder(store).defaultTopK(1).build())
.build();