Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-5660

JsonOutput Date formatting is not threadsafe

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.8.8, 2.0.2, 2.1.0-beta-1
    • JSON
    • None

    Description

      JsonOutput is using a static SimpleDateFormat object. This is not a threadsafe use of that class.

      See http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html#synchronization for more details.

      I did create a test case for this, but these are hard cases to test and it looks pretty ugly. I will happily submit it, however, if it helps.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            guillaume Guillaume Sauthier
            johnnywey Johnny Wey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment