HDFS-13261. Fix incorrect null value check. Contributed by Jianfei Jiang.

This commit is contained in:
Yiqun Lin 2018-03-15 11:06:04 +08:00
parent e840b4adf4
commit 3a0f4bc0d5
2 changed files with 2 additions and 2 deletions

View File

@ -223,7 +223,7 @@ public void reset() {
* a listReencryptionStatus call, for the crypto admin to consume.
*/
public void setZoneName(final String name) {
Preconditions.checkNotNull(name == null);
Preconditions.checkNotNull(name, "zone name cannot be null");
zoneName = name;
}

View File

@ -145,7 +145,7 @@ static class HelpCommand implements Command {
private final Command[] commands;
public HelpCommand(Command[] commands) {
Preconditions.checkNotNull(commands != null);
Preconditions.checkNotNull(commands, "commands cannot be null.");
this.commands = commands;
}