On Mon, 26 Oct 2020 14:29:00 GMT, Igor Ignatyev <iignat...@openjdk.org> wrote:
>> src/java.base/share/classes/sun/net/ftp/impl/FtpClient.java line 1777: >> >>> 1775: } >>> 1776: >>> 1777: private static Date parseRfc3659TimeValue(String s) { >> >> Shouldn't this method be synchronized because `SimpleDateFormat` is not >> thread-safe, but instances are stored in the static field `dateFormats`? >> (Note though that this issue existed before as well) > > thanks @Marcono1234, it indeed needs to be `synchronized`, I'll take care of > fixing that. @iignatev if you decide to log a followup a better alternative might be to use [DateTimeFormatter](https://docs.oracle.com/en/java/javase/15/docs/api/java.base/java/time/format/DateTimeFormatter.html) ------------- PR: https://git.openjdk.java.net/jdk/pull/776