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

Signed-off-by: Ayush Saxena <ayushsaxena@apache.org>
This commit is contained in:
NishthaShah 2023-05-20 14:40:23 +05:30 committed by GitHub
parent 408dbf318e
commit 9a524ede87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}