Uploaded image for project: 'HttpComponents HttpClient'
  1. HttpComponents HttpClient
  2. HTTPCLIENT-659

DateUtils should cache SimpleDateFormat

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 4.0 Alpha 2
    • HttpClient (classic)
    • None

    Description

      DateUtils create a SimpleDateFormat for each invocation of #formatDate and #parseDate. This can be optimized if SimpleDateFormat instances are cached. Since SimpleDateFormat is not threadsafe, the cache must be threadlocal.

      Attachments

        1. org.apache.http.util.patch
          3 kB
          Daniel Müller
        2. 20071018-001-dateutils.patch
          4 kB
          Oleg Kalnichevski

        Issue Links

          Activity

            People

              Unassigned Unassigned
              heron Daniel Müller
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: