Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[birt-dev] Checkin: enhance the synchronization code for last check in

- Summary:
Enhance the synchronization code for last check in


- Bugzilla Bug (s) Resolved:
Related with [Bug 147101] Report generation performance is sluggish


- Description:
There is potential bug in the synchronization code of last check. Fix it.

 

Old code:

DateFormatter df = (DateFormatter) ( dfMap.get( locale ) );

if ( df == null )

{

       synchronized ( DataTypeUtil.class )

       {

              df = (DateFormatter) ( dfMap.get( locale ) );

              if ( df == null )

              {

                     df = new DateFormatter( locale );

                     dfMap.put( locale, df );

              }

       }

}

      

New code:

DateFormatter df = null;

              synchronized ( DataTypeUtil.class )

              {

                     df = (DateFormatter) ( dfMap.get( locale ) );

                     if ( df == null )

                     {

                            df = new DateFormatter( locale );

                            dfMap.put( locale, df );

                     }

              }


- 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.birt.core/src/org/eclipse/birt/core/data/DataTypeUtil.java


- Files Added:

N/A

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


Back to the top