-
Bug
-
Resolution: Fixed
-
P4
-
20, 21
-
b12
I've noticed that method 'long java.util.Date.parse(String)' doesn't
have a reference to an IllegalArgumentException in its javadoc.
https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/util/Date.html#parse(java.lang.String)
But this exception is thrown in implementation - https://github.com/openjdk/jdk/blob/fbc036e7454720b589d99a8cae30369a10471528/src/java.base/share/classes/java/util/Date.java#L612
While this method is deprecated, it's still part of public API and should be properly documented.
Also it's still is used within JDK code itself. (seeJDK-4097762).
Additionally, for consistency, the java.util.Date(String) constructor should also have a reference.
have a reference to an IllegalArgumentException in its javadoc.
https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/util/Date.html#parse(java.lang.String)
But this exception is thrown in implementation - https://github.com/openjdk/jdk/blob/fbc036e7454720b589d99a8cae30369a10471528/src/java.base/share/classes/java/util/Date.java#L612
While this method is deprecated, it's still part of public API and should be properly documented.
Also it's still is used within JDK code itself. (see
Additionally, for consistency, the java.util.Date(String) constructor should also have a reference.
- csr for
-
JDK-8303263 java.util.Date.parse(String) and java.util.Date(String) don't declare thrown IllegalArgumentException
-
- Closed
-