Ivy
  1. Ivy
  2. IVY-1373

SimpleDateFormat not thread safe

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.0-RC1
    • Fix Version/s: 2.3.0-RC2
    • Component/s: Core
    • Labels:
      None

      Description

      Class org.apache.ivy.Ivy defines

      public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyyMMddHHmmss");

      SimpleDateFormat is not thread safe. Errors might occur like

      Caused by: java.lang.NumberFormatException: multiple points
        at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1101)
        at java.lang.Double.parseDouble(Double.java:540)
        at java.text.DigitList.getDouble(DigitList.java:168)
        at java.text.DecimalFormat.parse(DecimalFormat.java:1321)
        at java.text.SimpleDateFormat.subParse(SimpleDateFormat.java:1791)
        at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1455)
        at java.text.DateFormat.parse(DateFormat.java:355)
        at org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser$Parser.infoStarted(XmlModuleDescriptorParser.java:935)
        at org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser$Parser.startElement(XmlModuleDescriptorParser.java:297)
      

        Activity

        Hide
        Maarten Coene added a comment -

        Will be fixed in the next release.
        Thanks for reporting!

        Show
        Maarten Coene added a comment - Will be fixed in the next release. Thanks for reporting!

          People

          • Assignee:
            Maarten Coene
            Reporter:
            Wolfgang Frank
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development