RFR: 8255078: sun/net/ftp/imp/FtpClient$MLSxParser uses wrong datetime format [v3]

Igor Ignatyev iignatyev at openjdk.java.net
Mon Oct 26 14:32:11 UTC 2020


On Sun, 25 Oct 2020 00:35:20 GMT, Marcono1234 <github.com+11685886+Marcono1234 at openjdk.org> wrote:

>> Igor Ignatyev has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   use only filename in assert message
>
> 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.

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

PR: https://git.openjdk.java.net/jdk/pull/776


More information about the net-dev mailing list