RFR: 8303232: java.util.Date.parse(String) and java.util.Date(String) don't declare thrown IllegalArgumentException

Alan Bateman alanb at openjdk.org
Tue Feb 28 08:27:05 UTC 2023


On Tue, 28 Feb 2023 00:07:05 GMT, Justin Lu <jlu at openjdk.org> wrote:

> The method `java.util.Date.parse(String)` and as a result, constructor `java.util.Date(String)` throw an `IllegalArgumentException`. This exception is not properly referenced in the javadoc, and this PR simply adds the throws javadoc tag to make it apparent.

The changes adds a new testable assertion to the Date(String) constructor so it will need a CSR. For the parse method then it's mostly a doc update as the method description already documents that it throws IAE, it's just didn't declare with @throws for some reason.

-------------

PR: https://git.openjdk.org/jdk/pull/12779


More information about the core-libs-dev mailing list