Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public GeoJsonMultiPoint(Point first, Point second, Point... others) {
Assert.notNull(second, "Second point must not be null");
Assert.notNull(others, "Additional points must not be null");

this.points = new ArrayList<>();
this.points = new ArrayList<>(2 + others.length);
this.points.add(first);
this.points.add(second);
this.points.addAll(Arrays.asList(others));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,13 @@ public List<GeoJsonLineString> getCoordinates() {

private static List<Point> asList(Point first, Point second, Point third, Point fourth, Point... others) {

ArrayList<Point> result = new ArrayList<Point>(3 + others.length);
Assert.notNull(first, "First point must not be null");
Assert.notNull(second, "Second point must not be null");
Assert.notNull(third, "Third point must not be null");
Assert.notNull(fourth, "Fourth point must not be null");
Assert.notNull(others, "Additional points must not be null");

ArrayList<Point> result = new ArrayList<Point>(4 + others.length);

result.add(first);
result.add(second);
Expand Down