Skip to content

Commit 64313f8

Browse files
committed
Update Javadoc
1 parent 7fccff9 commit 64313f8

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

databricks-sdk-java/src/main/java/com/databricks/sdk/core/CliTokenSource.java

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,19 @@ public CliTokenSource(
4040
}
4141

4242
/**
43-
* Parses an expiry string in RFC 3339/ISO 8601 format (with or without offset) and returns the
44-
* corresponding {@link Instant}. Any specified time zone or offset is converted to UTC.
43+
* Parses an expiry time string and returns the corresponding {@link Instant}. The method attempts
44+
* to parse the input in the following order: 1. RFC 3339/ISO 8601 format with offset (e.g.
45+
* "2024-03-20T10:30:00Z") 2. Local date-time format "yyyy-MM-dd HH:mm:ss" (e.g. "2024-03-20
46+
* 10:30:00") 3. Local date-time format with optional fractional seconds of varying precision
47+
* (e.g. "2024-03-20 10:30:00.123")
4548
*
46-
* @param expiry expiry time string in RFC 3339/ISO 8601 format
49+
* <p>Any specified time zone or offset is converted to UTC. For local date-time formats, the
50+
* system's default time zone is used.
51+
*
52+
* @param expiry expiry time string in one of the supported formats
4753
* @return the parsed {@link Instant}
48-
* @throws DateTimeParseException if the input string cannot be parsed
54+
* @throws DateTimeParseException if the input string cannot be parsed in any of the supported
55+
* formats
4956
*/
5057
static Instant parseExpiry(String expiry) {
5158
DateTimeParseException parseException;

0 commit comments

Comments
 (0)