[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orekit Developers] Bug #33: UTCScale threading issue



On 01/10/2012 02:44 PM, Thomas Neidhart wrote:
> Hi,
> 
> The proposed change would be:
> 
>  - UTCScale shall implement the Cloneable interface
>  - implement a clone method that creates a new UTCScale instance
>    sharing the same UTCTAIOffset array
>  - update the TimeScalesFactory.getUTC method to return a clone of the
>    prototype UTCScale instance

The proposed solution has been committed to the repository (see rev
cdd9ef00).

The UTCTAIOffset array is currently shared by all instances, i.e. each
instance holds a reference to the same object.

Another option would be to use a static reference in UTCScale, but this
somehow interferes with the way the UTC-TAI offset history is currently
loaded in the TimeScalesFactory.

Thomas