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

FastDateFormat thread safety

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.4
    • None
    • None

    Description

      FastDateFormat has several static HashMaps. These are currently not final, so there is no guarantee that they will be visible to all threads.

      Patch to follow.

      Also, as far as I can make out, the class shares SimpleDateFormat instances between threads.

      It does not document why this is OK.

      I'm guessing that it assumes that instances of the SimpleDateFormat class are thread-safe provided that they have the same attributes, but this is not documented. If this is the case, it's not clear that it is a valid assumption.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sebb Sebb
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: