Prechádzať zdrojové kódy

HDFS-17022. Fix the exception message to print the Identifier pattern (#5678). Contributed by Nishtha Shah.

Signed-off-by: Ayush Saxena <ayushsaxena@apache.org>
NishthaShah 1 rok pred
rodič
commit
adb673fdaf

+ 1 - 1
hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/lib/util/Check.java

@@ -130,7 +130,7 @@ public class Check {
     }
     if (!IDENTIFIER_PATTERN.matcher(value).find()) {
       throw new IllegalArgumentException(
-        MessageFormat.format("[{0}] = [{1}] must be '{2}'", name, value, IDENTIFIER_PATTERN_STR));
+        MessageFormat.format("[{0}] = [{1}] must be \"{2}\"", name, value, IDENTIFIER_PATTERN_STR));
     }
     return value;
   }