XStream
  1. XStream
  2. XSTR-47

DateConverter not thread safe

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.6
    • Fix Version/s: 0.6
    • Component/s: Converters
    • Labels:
      None

      Description

      SimpleDateFormat docs recommend seperate instances created for each thread. see section on labeled "Synchronization"...

      If there are 2 different streams in 2 different threads using xstreams, then they could run into this one because ALL threads are sharing this converter class and their respective SimpleDateFormat instances.

      Use of ThreadLocal should make this an easy fix. I've actually run into this thread issue with the format call on SimpleDateFormat. email me if suggestions are wanted: stevemflanagan@yahoo.com

      thanks for a cool product!

        People

        • Assignee:
          Unassigned
          Reporter:
          Steve Flanagan
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: