mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-16 10:17:23 +00:00
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
1 changed files with 3 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue