Browse Source

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

Jonathan Eagles 8 năm trước cách đây
mục cha
commit
858d597be0

+ 1 - 1
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java

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