ICU-11131 re-checking in due to conflicts with r36481..
X-SVN-Rev: 36483
This commit is contained in:
parent
174485b702
commit
482e90080c
@ -58,6 +58,7 @@
|
||||
#include "uassert.h"
|
||||
#include "cmemory.h"
|
||||
#include "umutex.h"
|
||||
#include "mutex.h"
|
||||
#include <float.h>
|
||||
#include "smpdtfst.h"
|
||||
|
||||
@ -1072,7 +1073,9 @@ SimpleDateFormat::initNumberFormatters(const Locale &locale,UErrorCode &status)
|
||||
if ( fDateOverride.isBogus() && fTimeOverride.isBogus() ) {
|
||||
return;
|
||||
}
|
||||
umtx_lock(&LOCK);
|
||||
|
||||
{
|
||||
UMutex lock(&LOCK);
|
||||
if (fNumberFormatters == NULL) {
|
||||
fNumberFormatters = (NumberFormat**)uprv_malloc(UDAT_FIELD_COUNT * sizeof(NumberFormat*));
|
||||
if (fNumberFormatters) {
|
||||
@ -1083,7 +1086,8 @@ SimpleDateFormat::initNumberFormatters(const Locale &locale,UErrorCode &status)
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
}
|
||||
}
|
||||
umtx_unlock(&LOCK);
|
||||
// exit mutex
|
||||
}
|
||||
|
||||
if (U_FAILURE(status)) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user