mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-10 07:39:16 +00:00
ICU-5253 support resource==0 as designed and documented
X-SVN-Rev: 19788
This commit is contained in:
parent
21502ad4e2
commit
820ca02a9f
1 changed files with 10 additions and 0 deletions
|
@ -599,6 +599,16 @@ public class ICUResourceBundleImpl extends ICUResourceBundle {
|
|||
}
|
||||
}
|
||||
private String getStringValue(long resource) {
|
||||
if (resource == 0) {
|
||||
/*
|
||||
* The data structure is documented as supporting resource==0 for empty strings.
|
||||
* Return a fixed pointer in such a case.
|
||||
* This was dropped in uresdata.c 1.17 as part of Jitterbug 1005 work
|
||||
* on code coverage for ICU 2.0.
|
||||
* Re-added for consistency with the design and with other code.
|
||||
*/
|
||||
return "";
|
||||
}
|
||||
int offset = RES_GET_OFFSET(resource);
|
||||
int length = getInt(rawData,offset);
|
||||
int stringOffset = offset + getIntOffset(1);
|
||||
|
|
Loading…
Add table
Reference in a new issue