Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8255405

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

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8, 11, 15, 16
    • Fix Version/s: 16
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b23

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: