Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-448

Synchronization of SimpleDateFormat object in DateConverter

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • None
    • logback-classic
    • None
    • Operating System: All
      Platform: All

    • 117

    Description

      According to the API documentation of SimpleDateFormat, date formats are not synchronized and it is recommended to create separate format instances for each thread.
      However, a possibly simpler (mer efficient) solution would be to synchronize on the SimpleDateFormat object in the convert() method to prevent two threads to access it concurrently.

      Attachments

        Activity

          People

            logback-dev Logback dev list
            rgoers@apache.org Ralph Goers
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: