Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-15421

Non thread safe use of DateFormat

    XMLWordPrintable

Details

    Description

      We have received a stack trace from a customer where, during their performance testing, DateFormat's parse function has thrown a Runtime Exception, java.lang.NumberFormatException:

      java.lang.NumberFormatException: multiple points
              at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1084)
              at java.lang.Double.parseDouble(Double.java:510)
              at java.text.DigitList.getDouble(DigitList.java:151)
              at java.text.DecimalFormat.parse(DecimalFormat.java:1303)
              at java.text.SimpleDateFormat.subParse(SimpleDateFormat.java:1918)
              at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1264)
              at java.text.DateFormat.parse(DateFormat.java:335)
              at com.atlassian.jira.web.util.OutlookDate.parseDatePicker(OutlookDate.java:298)
              at com.atlassian.jira.web.util.OutlookDate.isDatePickerDate(OutlookDate.java:334)
              at com.atlassian.jira.issue.fields.DueDateSystemField.validateParams(DueDateSystemField.java:103)
              at com.atlassian.jira.web.action.issue.IssueCreationHelperBeanImpl.validateCreateIssueFields(IssueCreationHelperBeanImpl.java:74)
              at com.atlassian.jira.web.action.issue.CreateIssueDetails.doValidation(CreateIssueDetails.java:71)
      ...
      ...
      

      The problem seems to be related to the non-thread safety of the DateFormat class, as pointed out on the Sun Forum's page. It seems like an OutlookDate object has been used in a non-thread safe manner.

      Attachments

        Activity

          People

            Unassigned Unassigned
            dalonso Diego Alonso [Atlassian]
            Votes:
            4 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: