DATACMNS-985 - Remove references to single-argument assertion methods.
This commit is contained in:
committed by
Oliver Gierke
parent
49817278b7
commit
3e048a6dca
@@ -40,8 +40,8 @@ public class Box implements Shape {
|
||||
*/
|
||||
public Box(Point first, Point second) {
|
||||
|
||||
Assert.notNull(first);
|
||||
Assert.notNull(second);
|
||||
Assert.notNull(first, "First point must not be null!");
|
||||
Assert.notNull(second, "Second point must not be null!");
|
||||
|
||||
this.first = first;
|
||||
this.second = second;
|
||||
|
||||
@@ -42,8 +42,8 @@ public class Circle implements Shape {
|
||||
@PersistenceConstructor
|
||||
public Circle(Point center, Distance radius) {
|
||||
|
||||
Assert.notNull(center);
|
||||
Assert.notNull(radius);
|
||||
Assert.notNull(center, "Center point must not be null!");
|
||||
Assert.notNull(radius, "Radius must not be null!");
|
||||
Assert.isTrue(radius.getValue() >= 0, "Radius must not be negative!");
|
||||
|
||||
this.center = center;
|
||||
|
||||
@@ -41,8 +41,8 @@ public class GeoResult<T> implements Serializable {
|
||||
*/
|
||||
public GeoResult(T content, Distance distance) {
|
||||
|
||||
Assert.notNull(content);
|
||||
Assert.notNull(distance);
|
||||
Assert.notNull(content, "Content must not be null!");
|
||||
Assert.notNull(distance, "Distance must not be null!");
|
||||
|
||||
this.content = content;
|
||||
this.distance = distance;
|
||||
|
||||
@@ -68,7 +68,7 @@ public class GeoResults<T> implements Iterable<GeoResult<T>>, Serializable {
|
||||
@PersistenceConstructor
|
||||
public GeoResults(List<? extends GeoResult<T>> results, Distance averageDistance) {
|
||||
|
||||
Assert.notNull(results);
|
||||
Assert.notNull(results, "Results must not be null!");
|
||||
|
||||
this.results = results;
|
||||
this.averageDistance = averageDistance;
|
||||
|
||||
@@ -55,7 +55,7 @@ public class Point implements Serializable {
|
||||
*/
|
||||
public Point(Point point) {
|
||||
|
||||
Assert.notNull(point);
|
||||
Assert.notNull(point, "Source point must not be null!");
|
||||
|
||||
this.x = point.x;
|
||||
this.y = point.y;
|
||||
|
||||
@@ -51,7 +51,7 @@ public class Polygon implements Iterable<Point>, Shape {
|
||||
Assert.notNull(x, "X coordinate must not be null!");
|
||||
Assert.notNull(y, "Y coordinate must not be null!");
|
||||
Assert.notNull(z, "Z coordinate must not be null!");
|
||||
Assert.notNull(others);
|
||||
Assert.notNull(others, "Others must not be null!");
|
||||
|
||||
List<Point> points = new ArrayList<Point>(3 + others.length);
|
||||
points.addAll(Arrays.asList(x, y, z));
|
||||
@@ -68,13 +68,13 @@ public class Polygon implements Iterable<Point>, Shape {
|
||||
@PersistenceConstructor
|
||||
public Polygon(List<? extends Point> points) {
|
||||
|
||||
Assert.notNull(points);
|
||||
Assert.notNull(points, "Points must not be null!");
|
||||
|
||||
List<Point> pointsToSet = new ArrayList<Point>(points.size());
|
||||
|
||||
for (Point point : points) {
|
||||
|
||||
Assert.notNull(point);
|
||||
Assert.notNull(point, "Single Point in Polygon must not be null!");
|
||||
pointsToSet.add(point);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user