-
Bug
-
Resolution: Fixed
-
P3
-
1.3.0
-
None
-
beta2
-
generic
-
generic
michelle.devereux@Ireland 2001-06-27
Calendar.getInstance() methods should not be synchronised as unnecessary synchronisation could block the execution of multiple threads.
From IBM:
>
> "I can also see no reason why these
> methods(Calendar.getInstance() ) are synchronised with their
> present implementations but the intent is to return
> something initialised to the 'present time' hence you might
> expect an actual implementation to sample the time, create
> some object or set of objects and then ensure that
> everything refers to the same time. That would avoid the
> possibility that the returned object was internally
> inconsistent and implies the need to synchronise. I imagine
> that's why the interface is specified as it is "
>
Calendar.getInstance() methods should not be synchronised as unnecessary synchronisation could block the execution of multiple threads.
From IBM:
>
> "I can also see no reason why these
> methods(Calendar.getInstance() ) are synchronised with their
> present implementations but the intent is to return
> something initialised to the 'present time' hence you might
> expect an actual implementation to sample the time, create
> some object or set of objects and then ensure that
> everything refers to the same time. That would avoid the
> possibility that the returned object was internally
> inconsistent and implies the need to synchronise. I imagine
> that's why the interface is specified as it is "
>