RFR: 8301964: Expensive fillInStackTrace operation in HttpURLConnection.getLastModified when no last-modified in response
Alan Bateman
alanb at openjdk.org
Tue Feb 7 11:07:47 UTC 2023
On Tue, 7 Feb 2023 09:19:06 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:
> [JDK-8297211](https://bugs.openjdk.org/browse/JDK-8297211) (#11258) missed one case with `last-modified` header. We can avoid expensive NPE.
src/java.base/share/classes/java/net/HttpURLConnection.java line 609:
> 607: }
> 608: try {
> 609: return Date.parse(dateString);
Changing this method makes me wonder if we should replace the Date.parse usage with DateTimeFormatter while we are there, also the parameter name "Default" wants to be renamed too.
-------------
PR: https://git.openjdk.org/jdk/pull/12451
More information about the net-dev
mailing list