SOLR-11907: Change error message if ConvexHull2D is not provided as the first parameter

This commit is contained in:
Joel Bernstein 2018-09-30 21:11:23 -04:00
parent 3fc58f4a98
commit 3ece536d81
4 changed files with 4 additions and 4 deletions

View File

@ -34,7 +34,7 @@ public class GetAreaEvaluator extends RecursiveObjectEvaluator implements OneVal
@Override
public Object doWork(Object value) throws IOException {
if(!(value instanceof ConvexHull2D)){
throw new IOException(String.format(Locale.ROOT,"Invalid expression %s - found type %s for value, expecting a clustering result",toExpression(constructingFactory), value.getClass().getSimpleName()));
throw new IOException(String.format(Locale.ROOT,"Invalid expression %s - found type %s for value, expecting a ConvexHull2D",toExpression(constructingFactory), value.getClass().getSimpleName()));
} else {
ConvexHull2D convexHull2D = (ConvexHull2D)value;
return convexHull2D.createRegion().getSize();

View File

@ -37,7 +37,7 @@ public class GetBaryCenterEvaluator extends RecursiveObjectEvaluator implements
@Override
public Object doWork(Object value) throws IOException {
if(!(value instanceof ConvexHull2D)){
throw new IOException(String.format(Locale.ROOT,"Invalid expression %s - found type %s for value, expecting a clustering result",toExpression(constructingFactory), value.getClass().getSimpleName()));
throw new IOException(String.format(Locale.ROOT,"Invalid expression %s - found type %s for value, expecting a ConvexHull2D",toExpression(constructingFactory), value.getClass().getSimpleName()));
} else {
ConvexHull2D convexHull2D = (ConvexHull2D)value;
Vector2D vector2D = (Vector2D)convexHull2D.createRegion().getBarycenter();

View File

@ -34,7 +34,7 @@ public class GetBoundarySizeEvaluator extends RecursiveObjectEvaluator implement
@Override
public Object doWork(Object value) throws IOException {
if(!(value instanceof ConvexHull2D)){
throw new IOException(String.format(Locale.ROOT,"Invalid expression %s - found type %s for value, expecting a clustering result",toExpression(constructingFactory), value.getClass().getSimpleName()));
throw new IOException(String.format(Locale.ROOT,"Invalid expression %s - found type %s for value, expecting a ConvexHull2D",toExpression(constructingFactory), value.getClass().getSimpleName()));
} else {
ConvexHull2D convexHull2D = (ConvexHull2D)value;
return convexHull2D.createRegion().getBoundarySize();

View File

@ -35,7 +35,7 @@ public class GetVerticesEvaluator extends RecursiveObjectEvaluator implements On
@Override
public Object doWork(Object value) throws IOException {
if(!(value instanceof ConvexHull2D)){
throw new IOException(String.format(Locale.ROOT,"Invalid expression %s - found type %s for value, expecting a clustering result",toExpression(constructingFactory), value.getClass().getSimpleName()));
throw new IOException(String.format(Locale.ROOT,"Invalid expression %s - found type %s for value, expecting a ConvexHull2D",toExpression(constructingFactory), value.getClass().getSimpleName()));
} else {
ConvexHull2D convexHull2D = (ConvexHull2D)value;
Vector2D[] vectors = convexHull2D.getVertices();