Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[birt-dev] CheckIn:Fix thread-safe problem of birt oda xml driver APIs.(2.1.2)

-          Summary:

CheckIn:Fix thread-safe problem of birt oda xml driver APIs.(2.1.2)

- Bugzilla Bug (s) Resolved: 

-          Description:

This check in fix the thread-safe problem of the date/time transformation methods  in org.eclipse.birt.report.data.oda.xml (2.1.2 branch). 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 icu’s 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:
Unit test.


- Files Edited:

"/org.eclipse.birt.report.data.oda.xml/src/org/eclipse/birt/report/data/oda/xml/util/date/DateUtil.java"

"/org.eclipse.birt.report.data.oda.xml/test/org/eclipse/birt/report/data/oda/xml/ResultSetTest.java"

"/org.eclipse.birt.report.data.oda.xml/src/org/eclipse/birt/report/data/oda/xml/util/date/DateFormatISO8601.java""

 

"/org.eclipse.birt.report.data.oda.xml/test/org/eclipse/birt/report/data/oda/xml/util/date/DateUtilTest.java"

 

- Files Added:

"/org.eclipse.birt.report.data.oda.xml/src/org/eclipse/birt/report/data/oda/xml/util/date/DateFormatFactory.java"

"/org.eclipse.birt.report.data.oda.xml/test/org/eclipse/birt/report/data/oda/xml/util/date/DateUtilThreadTest.java"

 

- Files Deleted:

"/org.eclipse.birt.report.data.oda.xml/src/org/eclipse/birt/report/data/oda/xml/util/date/DateFormatter.java"

"/org.eclipse.birt.report.data.oda.xml/src/org/eclipse/birt/report/data/oda/xml/util/date/DateFormatUtil.java"

 

 

- Notes to Build Team:
N/A


- Notes to Developers:
N/A


- Notes to QA: 
 

N/A

 

- Notes to Documentation:  
N/A

 

 

 

 


Back to the top