提交 2b74c491 编写于 作者: N naoto

7156459: Remove unnecessary get() from Currency.getInstance()

Reviewed-by: chegar, dholmes, mduigou
上级 1d7b3c51
...@@ -323,9 +323,10 @@ public final class Currency implements Serializable { ...@@ -323,9 +323,10 @@ public final class Currency implements Serializable {
} }
} }
instance = instances.putIfAbsent(currencyCode, Currency currencyVal =
new Currency(currencyCode, defaultFractionDigits, numericCode)); new Currency(currencyCode, defaultFractionDigits, numericCode);
return (instance != null ? instance : instances.get(currencyCode)); instance = instances.putIfAbsent(currencyCode, currencyVal);
return (instance != null ? instance : currencyVal);
} }
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册