From 4e40e9d4db6cf6c8b53a782113df9fc460335817 Mon Sep 17 00:00:00 2001 From: Jonathan Eagles Date: Mon, 27 Mar 2017 11:01:48 -0500 Subject: [PATCH] Delay construction of PreCondition.check failure message in Configuration#set (jeagles) (cherry picked from commit 858d597be00ce006c1d1d4cd476729e4f1de8d25) --- .../src/main/java/org/apache/hadoop/conf/Configuration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java index f016119554e..7d10471d952 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java @@ -1141,7 +1141,7 @@ public class Configuration implements Iterable>, "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()) {