ICU-12634 remove TableSink.getOrCreateArraySink()
X-SVN-Rev: 38950
This commit is contained in:
parent
9c3ea44c11
commit
ef25688440
@ -36,7 +36,7 @@ public final class ICUResourceBundleReader {
|
||||
*/
|
||||
private static final int DATA_FORMAT = 0x52657342;
|
||||
private static final class IsAcceptable implements ICUBinary.Authenticate {
|
||||
// @Override when we switch to Java 6
|
||||
@Override
|
||||
public boolean isDataVersionAcceptable(byte formatVersion[]) {
|
||||
return
|
||||
(formatVersion[0] == 1 && (formatVersion[1] & 0xff) >= 1) ||
|
||||
@ -157,6 +157,7 @@ public final class ICUResourceBundleReader {
|
||||
this.localeID = (localeID == null) ? "" : localeID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
@ -169,6 +170,7 @@ public final class ICUResourceBundleReader {
|
||||
&& this.localeID.equals(info.localeID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return baseName.hashCode() ^ localeID.hashCode();
|
||||
}
|
||||
@ -532,7 +534,7 @@ public final class ICUResourceBundleReader {
|
||||
length=((first-0xdfef)<<16)|b16BitUnits.charAt(offset+1);
|
||||
offset+=2;
|
||||
} else {
|
||||
length=((int)b16BitUnits.charAt(offset+1)<<16)|b16BitUnits.charAt(offset+2);
|
||||
length=(b16BitUnits.charAt(offset+1)<<16)|b16BitUnits.charAt(offset+2);
|
||||
offset+=3;
|
||||
}
|
||||
// Cast up to CharSequence to insulate against the CharBuffer.subSequence() return type change
|
||||
@ -1091,11 +1093,8 @@ public final class ICUResourceBundleReader {
|
||||
int res = getContainerResource(reader, i);
|
||||
int type = RES_GET_TYPE(res);
|
||||
if (URES_IS_ARRAY(type)) {
|
||||
ArraySink subSink = sink.getOrCreateArraySink(key);
|
||||
if (subSink != null) {
|
||||
Array array = reader.getArray(res);
|
||||
array.getAllItems(reader, key, value, subSink);
|
||||
}
|
||||
// ICU ticket #12634: This original version of the enumeration code
|
||||
// is going away. getOrCreateArraySink(key) was unused and has been removed.
|
||||
} else if (URES_IS_TABLE(type)) {
|
||||
TableSink subSink = sink.getOrCreateTableSink(key);
|
||||
if (subSink != null) {
|
||||
|
@ -142,6 +142,7 @@ public final class UResource {
|
||||
/**
|
||||
* Creates/caches/returns this resource key string as a Java String.
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
if (s == null) {
|
||||
s = internalSubString(0, length);
|
||||
@ -257,7 +258,7 @@ public final class UResource {
|
||||
int csLength = cs.length();
|
||||
int minLength = length <= csLength ? length : csLength;
|
||||
for (int i = 0; i < minLength; ++i) {
|
||||
int diff = (int)charAt(i) - (int)cs.charAt(i);
|
||||
int diff = charAt(i) - cs.charAt(i);
|
||||
if (diff != 0) {
|
||||
return diff;
|
||||
}
|
||||
@ -563,19 +564,6 @@ public final class UResource {
|
||||
*/
|
||||
public void putNoFallback(Key key) {}
|
||||
|
||||
/**
|
||||
* Returns a nested resource array for the key as another sink.
|
||||
* Creates the sink if none exists for the key.
|
||||
* Returns null if nested arrays are not supported.
|
||||
* The default implementation always returns null.
|
||||
*
|
||||
* @param key resource key string
|
||||
* @return nested-array sink, or null
|
||||
*/
|
||||
public ArraySink getOrCreateArraySink(Key key) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a nested resource table for the key as another sink.
|
||||
* Creates the sink if none exists for the key.
|
||||
|
Loading…
Reference in New Issue
Block a user