ICU-597 One of the tests calls the copy constructor on as/400 on a bad resource bundle,
while the other platforms seem to optimize away the extra call to the copy constructor. X-SVN-Rev: 4794
This commit is contained in:
parent
c7298798f0
commit
81ed530191
@ -249,13 +249,18 @@ ResourceBundle::ResourceBundle(const wchar_t* path,
|
||||
ResourceBundle::ResourceBundle(const ResourceBundle &other) {
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
|
||||
if(other.resource->fIsTopLevel == TRUE) {
|
||||
constructForLocale(ures_getPath(other.resource), Locale(ures_getName(other.resource)), status);
|
||||
} else {
|
||||
if (other.resource) {
|
||||
if(other.resource->fIsTopLevel == TRUE) {
|
||||
constructForLocale(ures_getPath(other.resource), Locale(ures_getName(other.resource)), status);
|
||||
} else {
|
||||
#ifdef ICU_RESBUND_USE_DEPRECATES
|
||||
fItemCache = 0;
|
||||
fItemCache = 0;
|
||||
#endif
|
||||
resource = copyResb(0, other.resource, &status);
|
||||
resource = copyResb(0, other.resource, &status);
|
||||
}
|
||||
} else {
|
||||
/* Copying a bad resource bundle */
|
||||
resource = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user