Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[birt-dev] Checkin: Fix bug 167415:Make XML and Flatfile driver's date-time tranformation method thread safe.

- Summary:

Fix bug 167415


- Bugzilla Bug (s) Resolved:
Fix bug 167415:Make XML and Flatfile driver's date-time tranformation method thread safe.

 

- Description:
This check in fix the thread-safe problem of the date/time transformation methods  in org.eclipse.datatools.connectivity.oda.flatfile and org.eclipse.datatools.enablement.oda.xml. Before this check in is made, we use icu’s DateFormat class to parse date strings, which is not thread-safe. The following changes are made to ensure the thread-safety:

1. Switch for icu’s DateFormat to java.text.DateFormat. We do so because icu 3.4.5 has bug: exception will through even different DateFormat instance are used by each thread to parsing certain date/time string values. This bug is an obvious conflict to icus java doc.

2. As java.text.DateFormat its self is not thread-safe. We create different DateFormat instances for different thread by using java class ThreadLocal.

 

The unit test cases are added as well.


- Tests Description:
 Junit Test

 

- Notes to Build Team:
N/A


- Notes to Developers:
N/A


- Notes to QA: 
 

N/A

 

- Notes to Documentation:  
N/A

 

- Files Edited:

/org.eclipse.datatools.connectivity.oda.flatfile/src/org/eclipse/datatools/connectivity/oda/flatfile/util/DateUtil.java

/org.eclipse.datatools.connectivity.oda.flatfile/src/org/eclipse/datatools/connectivity/oda/flatfile/util/DateFormatISO8601.java

/org.eclipse.datatools.enablement.oda.xml.tests/test/org/eclipse/datatools/enablement/oda/xml/util/date/DateUtilTest.java

/org.eclipse.datatools.enablement.oda.xml/src/org/eclipse/datatools/enablement/oda/xml/util/date/DateFormatISO8601.java

/org.eclipse.datatools.enablement.oda.xml/src/org/eclipse/datatools/enablement/oda/xml/util/date/DateUtil.java

/org.eclipse.datatools.connectivity.oda.flatfile.tests/src/org/eclipse/datatools/connectivity/oda/flatfile/tests/util/DateUtilTest.java


- Files Added:

/org.eclipse.datatools.connectivity.oda.flatfile/src/org/eclipse/datatools/connectivity/oda/flatfile/util/DateFormatFactory.java

/org.eclipse.datatools.enablement.oda.xml/src/org/eclipse/datatools/enablement/oda/xml/util/date/DateFormatFactory.java

 

 

 - Files Removed:

/org.eclipse.datatools.connectivity.oda.flatfile/src/org/eclipse/datatools/connectivity/oda/flatfile/util/DateFormatUtil.java

/org.eclipse.datatools.connectivity.oda.flatfile/src/org/eclipse/datatools/connectivity/oda/flatfile/util/DateFormatter.java

/org.eclipse.datatools.enablement.oda.xml/src/org/eclipse/datatools/enablement/oda/xml/util/date/DateFormatter.java

/org.eclipse.datatools.enablement.oda.xml/src/org/eclipse/datatools/enablement/oda/xml/util/date/DateFormatUtil.java

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


Back to the top