Re: RFR: 8255405: sun/net/ftp/imp/FtpClient uses SimpleDateFormat in not thread-safe manner [v2]

2020-10-28 Thread Igor Ignatyev
On Wed, 28 Oct 2020 12:52:41 GMT, Rahul Yadav wrote: >> src/java.base/share/classes/sun/net/ftp/impl/FtpClient.java line 1770: >> >>> 1768: try { >>> 1769: var d = LocalDateTime.parse(s, RFC3659_DATETIME_FORMAT); >>> 1770: result = >>> Date.from(d.atZone(ZoneOffs

Re: RFR: 8255405: sun/net/ftp/imp/FtpClient uses SimpleDateFormat in not thread-safe manner [v2]

2020-10-28 Thread Rahul Yadav
On Wed, 28 Oct 2020 11:10:33 GMT, Daniel Fuchs wrote: >> Igor Ignatyev has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - remove \n from MDTM response before parsing >> - added leading 0 to the test >> - use DateTimeFormatter instead

Re: RFR: 8255405: sun/net/ftp/imp/FtpClient uses SimpleDateFormat in not thread-safe manner [v2]

2020-10-28 Thread Daniel Fuchs
On Tue, 27 Oct 2020 18:54:30 GMT, Igor Ignatyev wrote: >> Hi all, >> >> could you please review this small and trivial fix? >> >> `sun/net/ftp/imp/FtpClient::dateFormats` is an array of `SimpleDateFormat` >> which are shared among all instances of `FtpClient`. the fact that >> `SimpleDateForm

Re: RFR: 8255405: sun/net/ftp/imp/FtpClient uses SimpleDateFormat in not thread-safe manner [v2]

2020-10-27 Thread Igor Ignatyev
> Hi all, > > could you please review this small and trivial fix? > > `sun/net/ftp/imp/FtpClient::dateFormats` is an array of `SimpleDateFormat` > which are shared among all instances of `FtpClient`. the fact that > `SimpleDateFormat` isn't thread-safe renders`FtpClient` to be non-thread-safe