diff --git a/spring-ai-core/src/main/java/org/springframework/ai/embedding/Embedding.java b/spring-ai-core/src/main/java/org/springframework/ai/embedding/Embedding.java index 2448f630ce5..add3533b08e 100644 --- a/spring-ai-core/src/main/java/org/springframework/ai/embedding/Embedding.java +++ b/spring-ai-core/src/main/java/org/springframework/ai/embedding/Embedding.java @@ -39,7 +39,7 @@ public int hashCode() { @Override public String toString() { - String message = this.embedding.size() == 0 ? "" : ""; + String message = this.embedding.isEmpty() ? "" : ""; return "Embedding{" + "embedding=" + message + ", index=" + index + '}'; }