mirror of https://github.com/apache/lucene.git
SOLR-10303: Error message formatting for TemporalEvaluator
This commit is contained in:
parent
1c333c79d0
commit
8642ed9f88
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue