Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix javadoc + change exception type
  • Loading branch information
olavloite committed Jul 26, 2019
commit b53e75fee88a7d9cdb347c09a90af305a616dcfa
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,7 @@ public int hashCode() {
* NumberFormatException}. Also, in accordance with the RFC3339 standard, any number of
* milliseconds digits is now allowed.
*
* <p>Any time information beyond millisecond precision will be truncated. Prior to version 1.30.2
* this method did not have a well-defined behavior of what would happen with any time information
* beyond millisecond precision. This could cause some values with more than millisecond precision
* to be rounded up instead of truncated.
* <p>Any time information beyond millisecond precision is truncated.
*
* <p>For the date-only case, the time zone is ignored and the hourOfDay, minute, second, and
* millisecond parameters are set to zero.
Expand All @@ -284,12 +281,12 @@ public static DateTime parseRfc3339(String str) throws NumberFormatException {
* Parses an RFC3339 timestamp to a pair of seconds and nanoseconds since Unix Epoch.
*
* @param str Date/time string in RFC3339 format
* @throws NumberFormatException if {@code str} doesn't match the RFC3339 standard format; an
* @throws IllegalArgumentException if {@code str} doesn't match the RFC3339 standard format; an
* exception is thrown if {@code str} doesn't match {@code RFC3339_REGEX} or if it contains a
* time zone shift but no time.
*/
public static SecondsAndNanos parseRfc3339ToSecondsAndNanos(String str)
throws NumberFormatException {
throws IllegalArgumentException {
return parseRfc3339WithNanoSeconds(str).toSecondsAndNanos();
}

Expand Down