Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-909

Thread-safe wrapper for SimpleDateFormat

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • 3.1
    • None
    • lang.time.*
    • None

    Description

      SimpleDateFormat implementation in JDK is known to be not thread-safe. The attached helper class solves the problem by holding a separate instance of SimpleDateFormat per thread.

      Attachments

        1. ThreadSafeSimpleDateFormatTest.java
          5 kB
          Dmitry Katsubo
        2. ThreadSafeSimpleDateFormat.java
          3 kB
          Dmitry Katsubo
        3. DateFormatAdapter.java
          2 kB
          Dmitry Katsubo

        Activity

          People

            Unassigned Unassigned
            dma_k Dmitry Katsubo
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: