SOLR-10303: Error message formatting for TemporalEvaluator

This commit is contained in:
Gethin James 2017-04-06 17:19:31 +02:00 committed by Joel Bernstein
parent 1c333c79d0
commit 8642ed9f88
2 changed files with 3 additions and 3 deletions

View File

@ -83,7 +83,7 @@ public abstract class TemporalEvaluator extends ComplexEvaluator {
}
}
throw new IOException(String.format(Locale.ROOT, "Invalid parameter %s - The parameter must be a string formatted ISO_INSTANT or of type Instant,Date or LocalDateTime.", String.valueOf(tupleValue)));
throw new IOException(String.format(Locale.ROOT, "Invalid parameter %s - The parameter must be a string formatted ISO_INSTANT or of type Long,Instant,Date,LocalDateTime or TemporalAccessor.", String.valueOf(tupleValue)));
}
public abstract Object evaluateDate(TemporalAccessor aDate) throws IOException;

View File

@ -132,7 +132,7 @@ public class TemporalEvaluatorsTest {
Object result = evaluator.evaluate(new Tuple(values));
assertTrue(false);
} catch (IOException e) {
assertEquals("Invalid parameter 12 - The parameter must be a string formatted ISO_INSTANT or of type Instant,Date or LocalDateTime.", e.getMessage());
assertEquals("Invalid parameter 12 - The parameter must be a string formatted ISO_INSTANT or of type Long,Instant,Date,LocalDateTime or TemporalAccessor.", e.getMessage());
}
try {
@ -150,7 +150,7 @@ public class TemporalEvaluatorsTest {
Object result = evaluator.evaluate(new Tuple(values));
assertTrue(false);
} catch (IOException e) {
assertEquals("Invalid parameter - The parameter must be a string formatted ISO_INSTANT or of type Instant,Date or LocalDateTime.", e.getMessage());
assertEquals("Invalid parameter - The parameter must be a string formatted ISO_INSTANT or of type Long,Instant,Date,LocalDateTime or TemporalAccessor.", e.getMessage());
}
values.clear();