-
Notifications
You must be signed in to change notification settings - Fork 226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timestamp validation is technically wrong (Java 12 test failures) #155
Comments
Good find! We might have to just switch to a regex based validator. RFC 3339 isn't that complex based on the ABNF (we only support date-time):
|
mtdowling
added a commit
that referenced
this issue
Mar 15, 2020
mtdowling
added a commit
that referenced
this issue
Mar 16, 2020
Looking at this again, Smithy doesn't actually timestamp offsets, all we need to do is validate that timestamp strings end with "Z". c5aa1d7 |
mtdowling
added a commit
that referenced
this issue
Mar 16, 2020
JordonPhillips
pushed a commit
to JordonPhillips/smithy
that referenced
this issue
Apr 22, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There was a bug in
DateTimeFormatter.ISO_INSTANT
that was fixed in Java 12. Here is the link to that bug:https://bugs.openjdk.java.net/browse/JDK-8166138
This change exposes certain tests in
which rely on the incorrect, pre Java 12 behavior of
DateTimeFormatter.ISO_INSTANT
For example, it is asserted that the following string should fail timestamp validation:
In fact, this is a valid RFC 3389 time representation.
In Java versions prior to 12,
DateTimeFormatter.ISO_INSTANT
incorrectly throws for this parse, and the test which relies on this incorrect behavior passes.In Java version 12, the Java SDK bug was fixed and the test fails because the string is a valid timestamp and Java no longer throws on the parse.
Bottom line: there are some tests that fail in Java 12.
The text was updated successfully, but these errors were encountered: