8319640: ClassicFormat::parseObject (from DateTimeFormatter) does not conform to the javadoc and may leak DateTimeException#16586
Conversation
|
👋 Welcome back naoto! A progress list of the required criteria for merging this PR into |
Webrevs
|
|
@naotoj This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 2 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
| .optionalEnd() | ||
| .toFormatter(Locale.ROOT) | ||
| .toFormat(); | ||
| assertEquals(f.parseObject("17-30", new ParsePosition(0)), null); |
There was a problem hiding this comment.
I might have missed it, but this test doesn't seem to exercise the situation where IOOBE would happen. Though the result would be the same as it catches RuntimeException always, I wonder whether an additional test case would be helpful to verify the IOOBE situation, e.g. set the position to be greater than the length.
There was a problem hiding this comment.
Thanks, Joe. Added extra test for IOOBE.
|
/integrate |
|
Going to push as commit fe0ccdf.
Your commit was automatically rebased without conflicts. |
Fixing the
Format::parseObject(String, ParsePosition)implementation inDateTimeFormatterclass, to not throwDateTimeExceptionbut to return null.Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/16586/head:pull/16586$ git checkout pull/16586Update a local copy of the PR:
$ git checkout pull/16586$ git pull https://git.openjdk.org/jdk.git pull/16586/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 16586View PR using the GUI difftool:
$ git pr show -t 16586Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/16586.diff
Webrev
Link to Webrev Comment