Wolfgang Frank created IVY-1373:
-----------------------------------

             Summary: SimpleDateFormat not thread safe
                 Key: IVY-1373
                 URL: https://issues.apache.org/jira/browse/IVY-1373
             Project: Ivy
          Issue Type: Bug
          Components: Core
    Affects Versions: 2.3.0-RC1
            Reporter: Wolfgang Frank


Class {{org.apache.ivy.Ivy}} defines 
{noformat}public static final SimpleDateFormat DATE_FORMAT = new 
SimpleDateFormat("yyyyMMddHHmmss");{noformat}

SimpleDateFormat is not thread safe. Errors might occur like 
{noformat}
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)
{noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to