Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@

package org.apache.hc.core5.util;

import java.text.ParseException;
import java.time.Instant;
import java.time.ZoneOffset;
import java.time.format.DateTimeFormatter;
Expand Down Expand Up @@ -60,12 +59,12 @@ public class Deadline {
/**
* The maximum (longest-lived) deadline.
*/
public static Deadline MAX_VALUE = new Deadline(INTERNAL_MAX_VALUE);
public static final Deadline MAX_VALUE = new Deadline(INTERNAL_MAX_VALUE);

/**
* The minimum (shortest-lived) deadline.
*/
public static Deadline MIN_VALUE = new Deadline(INTERNAL_MIN_VALUE);
public static final Deadline MIN_VALUE = new Deadline(INTERNAL_MIN_VALUE);

private static final DateTimeFormatter DATE_TIME_FORMATTER = new DateTimeFormatterBuilder()
.parseLenient()
Expand Down Expand Up @@ -122,9 +121,8 @@ public static Deadline fromUnixMilliseconds(final long value) {
*
* @param source a string in the format {@value #DATE_FORMAT}.
* @return a deadline from a string in the format {@value #DATE_FORMAT}.
* @throws ParseException if the specified source string cannot be parsed.
*/
public static Deadline parse(final String source) throws ParseException {
public static Deadline parse(final String source) {
if (source == null) {
return null;
}
Expand Down