Skip to content

Commit 451812e

Browse files
committed
Simplifying retry-after parser patterns
1 parent 71e6710 commit 451812e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

opamp-client/src/main/java/io/opentelemetry/opamp/client/internal/connectivity/http/RetryAfterParser.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515

1616
public final class RetryAfterParser {
1717
private final SystemTime systemTime;
18-
public static final Pattern SECONDS_PATTERN = Pattern.compile("^\\d+$");
19-
public static final Pattern DATE_PATTERN =
18+
private static final Pattern SECONDS_PATTERN = Pattern.compile("\\d+");
19+
private static final Pattern DATE_PATTERN =
2020
Pattern.compile(
21-
"^([A-Za-z]{3}, [0-3][0-9] [A-Za-z]{3} [0-9]{4} [0-2][0-9]:[0-5][0-9]:[0-5][0-9] GMT)$");
21+
"[A-Za-z]{3}, [0-3][0-9] [A-Za-z]{3} [0-9]{4} [0-2][0-9]:[0-5][0-9]:[0-5][0-9] GMT");
2222
private static final DateTimeFormatter DATE_FORMAT =
2323
DateTimeFormatter.ofPattern("EEE, dd MMM yyyy HH:mm:ss z", Locale.US);
2424

0 commit comments

Comments
 (0)