sun/net/ftp/imp/FtpClient uses SimpleDateFormat in not thread-safe manner

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 16
    • Affects Version/s: 8, 11, 15, 16
    • Component/s: core-libs
    • b23

      reported in https://github.com/openjdk/jdk/pull/776

      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 as well. the easiest fix would be to make the only usage of dateFormats (parseRfc3659TimeValue method) synchronized.

            Assignee:
            Igor Ignatyev (Inactive)
            Reporter:
            Igor Ignatyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: