HDFS-13261. Fix incorrect null value check. Contributed by Jianfei Jiang.
This commit is contained in:
parent
e840b4adf4
commit
3a0f4bc0d5
@ -223,7 +223,7 @@ public void reset() {
|
|||||||
* a listReencryptionStatus call, for the crypto admin to consume.
|
* a listReencryptionStatus call, for the crypto admin to consume.
|
||||||
*/
|
*/
|
||||||
public void setZoneName(final String name) {
|
public void setZoneName(final String name) {
|
||||||
Preconditions.checkNotNull(name == null);
|
Preconditions.checkNotNull(name, "zone name cannot be null");
|
||||||
zoneName = name;
|
zoneName = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ static class HelpCommand implements Command {
|
|||||||
private final Command[] commands;
|
private final Command[] commands;
|
||||||
|
|
||||||
public HelpCommand(Command[] commands) {
|
public HelpCommand(Command[] commands) {
|
||||||
Preconditions.checkNotNull(commands != null);
|
Preconditions.checkNotNull(commands, "commands cannot be null.");
|
||||||
this.commands = commands;
|
this.commands = commands;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user