Delay construction of PreCondition.check failure message in Configuration#set (jeagles)

(cherry picked from commit 858d597be0)
This commit is contained in:
Jonathan Eagles 2017-03-27 11:01:48 -05:00
parent 19d479168e
commit 4e40e9d4db
1 changed files with 1 additions and 1 deletions

View File

@ -1141,7 +1141,7 @@ public class Configuration implements Iterable<Map.Entry<String,String>>,
"Property name must not be null"); "Property name must not be null");
Preconditions.checkArgument( Preconditions.checkArgument(
value != null, value != null,
"The value of property " + name + " must not be null"); "The value of property %s must not be null", name);
name = name.trim(); name = name.trim();
DeprecationContext deprecations = deprecationContext.get(); DeprecationContext deprecations = deprecationContext.get();
if (deprecations.getDeprecatedKeyMap().isEmpty()) { if (deprecations.getDeprecatedKeyMap().isEmpty()) {