mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-10 07:39:16 +00:00
ICU-22425 Eliminate double map lookup for common case of present argument
In the uncommon case where the map lookup returns null, only then perform a second map lookup to determine whether it was an absent value or explicit null.
This commit is contained in:
parent
1b15a4e9db
commit
cd6ff4a64d
1 changed files with 4 additions and 1 deletions
|
@ -1683,8 +1683,11 @@ public class MessageFormat extends UFormat {
|
|||
}
|
||||
} else {
|
||||
argId = argName;
|
||||
if(argsMap!=null && argsMap.containsKey(argName)) {
|
||||
if(argsMap!=null) {
|
||||
arg=argsMap.get(argName);
|
||||
if (arg==null) {
|
||||
noArg=!argsMap.containsKey(argName);
|
||||
}
|
||||
} else {
|
||||
arg=null;
|
||||
noArg=true;
|
||||
|
|
Loading…
Add table
Reference in a new issue