ICU-7057 bug fix: make it work when assertions are disabled
X-SVN-Rev: 35788
This commit is contained in:
parent
4b5a43f324
commit
98772b58a6
@ -202,7 +202,7 @@ public final class CollationLoader {
|
||||
t.actualLocale = actualLocale;
|
||||
|
||||
// deserialize
|
||||
UResourceBundle binary = ((ICUResourceBundle)data).get("%%CollationBin");
|
||||
UResourceBundle binary = data.get("%%CollationBin");
|
||||
ByteBuffer inBytes = binary.getBinary();
|
||||
try {
|
||||
CollationDataReader.read(root, inBytes, t);
|
||||
|
@ -223,7 +223,8 @@ public final class ICUBinary
|
||||
// TODO Java 6 replace new byte[] and arraycopy(): byte[] newBytes = Arrays.copyOf(bytes, bytes.length + avail);
|
||||
byte[] newBytes = new byte[bytes.length + avail];
|
||||
System.arraycopy(bytes, 0, newBytes, 0, bytes.length);
|
||||
assert avail == is.read(newBytes, bytes.length, avail);
|
||||
int numRead = is.read(newBytes, bytes.length, avail);
|
||||
assert avail == numRead;
|
||||
bytes = newBytes;
|
||||
}
|
||||
return ByteBuffer.wrap(bytes);
|
||||
|
Loading…
Reference in New Issue
Block a user