Skip to content

Commit 1f5460a

Browse files
committed
add: assert messages when create polygon
1 parent a271433 commit 1f5460a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJsonPolygon.java

+6
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,12 @@ public List<GeoJsonLineString> getCoordinates() {
189189
@SafeVarargs
190190
private static <T> List<T> asList(T first, T second, T third, T fourth, T... others) {
191191

192+
Assert.notNull(first, "First element must not be null!");
193+
Assert.notNull(second, "Second element must not be null!");
194+
Assert.notNull(third, "Third element must not be null!");
195+
Assert.notNull(fourth, "Fourth element must not be null!");
196+
Assert.notNull(others, "Additional elements must not be null!");
197+
192198
ArrayList<T> result = new ArrayList<>(4 + others.length);
193199

194200
result.add(first);

0 commit comments

Comments
 (0)