ICU-9943 Fixed a coding problem detected by FindBugs - prevent null dereference
X-SVN-Rev: 33248
This commit is contained in:
parent
4dce9ff799
commit
a1296b9947
@ -4026,11 +4026,12 @@ public final class RuleBasedCollator extends Collator {
|
||||
|
||||
if (m_reorderCodes_[0] == ReorderCodes.DEFAULT) {
|
||||
if (m_reorderCodes_.length != 1) {
|
||||
throw new IllegalArgumentException("Illegal collation reorder codes - default reorder code must be the only code in the list.");
|
||||
throw new IllegalArgumentException("Illegal collation reorder codes - default reorder code must be the only code in the list.");
|
||||
}
|
||||
// swap the reorder codes for those at build of the rules
|
||||
if (m_defaultReorderCodes_ == null || m_defaultReorderCodes_.length == 0) {
|
||||
m_leadBytePermutationTable_ = null;
|
||||
m_leadBytePermutationTable_ = null;
|
||||
return;
|
||||
}
|
||||
m_reorderCodes_ = m_defaultReorderCodes_.clone();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user