Skip to content

Commit 358d761

Browse files
committed
javadoc update
1 parent d040c4d commit 358d761

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

server/src/main/java/org/elasticsearch/common/joda/JodaDateFormatter.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,11 @@ public JodaDateFormatter(String pattern, DateTimeFormatter parser, DateTimeForma
4646
}
4747

4848
/**
49-
* Try to parse input to a java time TemporalAccessor using Joda library
49+
* Try to parse input to a java time TemporalAccessor using joda-time library.
5050
* @see DateFormatter#parse(String)
51-
* @throws UnsupportedOperationException if parsing is not supported
5251
* @throws IllegalArgumentException if the text to parse is invalid
53-
* @see DateTimeFormatter#parseDateTime
54-
*
55-
* @throws java.time.DateTimeException as per java-time javadoc
56-
* @see ZonedDateTime#ofInstant(Instant, ZoneId)
57-
* @see Instant#ofEpochMilli(long)
52+
* @throws java.time.DateTimeException if the parsing result exceeds the supported range of <code>ZoneDateTime</code>
53+
* or if the parsed instant exceeds the maximum or minimum instant
5854
*/
5955
@Override
6056
public TemporalAccessor parse(String input) {

server/src/main/java/org/elasticsearch/common/time/DateFormatter.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import org.elasticsearch.common.joda.Joda;
2424
import org.joda.time.DateTime;
2525

26+
import java.time.DateTimeException;
2627
import java.time.Instant;
2728
import java.time.ZoneId;
2829
import java.time.ZoneOffset;
@@ -39,6 +40,8 @@ public interface DateFormatter {
3940
* @param input An arbitrary string resembling the string representation of a date or time
4041
* @throws IllegalArgumentException If parsing fails, this exception will be thrown.
4142
* Note that it can contained suppressed exceptions when several formatters failed parse this value
43+
* @throws DateTimeException if the parsing result exceeds the supported range of <code>ZoneDateTime</code>
44+
* or if the parsed instant exceeds the maximum or minimum instant
4245
* @return The java time object containing the parsed input
4346
*/
4447
TemporalAccessor parse(String input);

0 commit comments

Comments
 (0)