From 53420fda4a02904c0b7474d609a8347357c00ea2 Mon Sep 17 00:00:00 2001 From: Anush008 Date: Thu, 7 Dec 2023 21:39:32 +0530 Subject: [PATCH] chore: formatting plugin Java8 --- pom.xml | 12 ++++++++++++ src/main/java/io/qdrant/client/utils/PointUtil.java | 9 ++++++--- .../java/io/qdrant/client/utils/SelectorUtil.java | 4 ++-- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 98aea8bf..4a5ef1b3 100644 --- a/pom.xml +++ b/pom.xml @@ -109,6 +109,18 @@ + + com.coveo + fmt-maven-plugin + 2.9 + + + + format + + + + diff --git a/src/main/java/io/qdrant/client/utils/PointUtil.java b/src/main/java/io/qdrant/client/utils/PointUtil.java index 30db977d..e74b233f 100644 --- a/src/main/java/io/qdrant/client/utils/PointUtil.java +++ b/src/main/java/io/qdrant/client/utils/PointUtil.java @@ -16,7 +16,6 @@ import java.util.Arrays; import java.util.Map; import java.util.UUID; -import java.util.stream.Collector; import java.util.stream.Collectors; /** Utility class for working with Points. */ @@ -32,7 +31,8 @@ public static PointsSelector createPointsSelector(long... pointIds) { PointsIdsList pointsIdsList = PointsIdsList.newBuilder() - .addAllIds(Arrays.stream(pointIds).mapToObj(PointUtil::pointId).collect(Collectors.toList())) + .addAllIds( + Arrays.stream(pointIds).mapToObj(PointUtil::pointId).collect(Collectors.toList())) .build(); return PointsSelector.newBuilder().setPoints(pointsIdsList).build(); @@ -53,7 +53,10 @@ public static PointsSelector createPointsSelector(String... pointIds) { // Using map() instead PointsIdsList pointsIdsList = PointsIdsList.newBuilder() - .addAllIds(Arrays.stream(pointIds).map((String id) -> PointUtil.pointId(id)).collect(Collectors.toList())) + .addAllIds( + Arrays.stream(pointIds) + .map((String id) -> PointUtil.pointId(id)) + .collect(Collectors.toList())) .build(); return PointsSelector.newBuilder().setPoints(pointsIdsList).build(); diff --git a/src/main/java/io/qdrant/client/utils/SelectorUtil.java b/src/main/java/io/qdrant/client/utils/SelectorUtil.java index e2c6c0b1..519e6c35 100644 --- a/src/main/java/io/qdrant/client/utils/SelectorUtil.java +++ b/src/main/java/io/qdrant/client/utils/SelectorUtil.java @@ -8,7 +8,6 @@ import io.qdrant.client.grpc.Points.VectorsSelector; import io.qdrant.client.grpc.Points.WithPayloadSelector; import io.qdrant.client.grpc.Points.WithVectorsSelector; - import java.util.Arrays; import java.util.List; @@ -52,7 +51,8 @@ public static WithPayloadSelector withPayload(String... fields) { * @return The created {@link WithVectorsSelector} object. */ public static WithVectorsSelector withVectors(String... vectors) { - VectorsSelector include = VectorsSelector.newBuilder().addAllNames(Arrays.asList(vectors)).build(); + VectorsSelector include = + VectorsSelector.newBuilder().addAllNames(Arrays.asList(vectors)).build(); return WithVectorsSelector.newBuilder().setInclude(include).build(); }