Amend HBASE-15200 ZooKeeper znode ACL checks should only compare the shortname

Fixes for newly introduced FindBugs warnings
This commit is contained in:
Andrew Purtell 2016-02-04 16:17:41 -08:00
parent 846a2f31c1
commit 1b420be56a
1 changed files with 4 additions and 4 deletions

View File

@ -306,7 +306,7 @@ public class ZooKeeperWatcher implements Watcher, Abortable, Closeable {
if (Ids.ANYONE_ID_UNSAFE.equals(id)) {
if (perms != Perms.READ) {
if (LOG.isDebugEnabled()) {
LOG.debug(String.format("permissions for '%s' are not correct: have %0x, want %0x",
LOG.debug(String.format("permissions for '%s' are not correct: have 0x%x, want 0x%x",
id, perms, Perms.READ));
}
return false;
@ -314,7 +314,7 @@ public class ZooKeeperWatcher implements Watcher, Abortable, Closeable {
} else if (superUsers != null && isSuperUserId(superUsers, id)) {
if (perms != Perms.ALL) {
if (LOG.isDebugEnabled()) {
LOG.debug(String.format("permissions for '%s' are not correct: have %0x, want %0x",
LOG.debug(String.format("permissions for '%s' are not correct: have 0x%x, want 0x%x",
id, perms, Perms.ALL));
}
return false;
@ -329,7 +329,7 @@ public class ZooKeeperWatcher implements Watcher, Abortable, Closeable {
if (name.equals(hbaseUser)) {
if (perms != Perms.ALL) {
if (LOG.isDebugEnabled()) {
LOG.debug(String.format("permissions for '%s' are not correct: have %0x, want %0x",
LOG.debug(String.format("permissions for '%s' are not correct: have 0x%x, want 0x%x",
id, perms, Perms.ALL));
}
return false;
@ -365,7 +365,7 @@ public class ZooKeeperWatcher implements Watcher, Abortable, Closeable {
} else {
if (LOG.isDebugEnabled()) {
LOG.debug(String.format(
"superuser '%s' does not have correct permissions: have %0x, want %0x",
"superuser '%s' does not have correct permissions: have 0x%x, want 0x%x",
acl.getId().getId(), acl.getPerms(), Perms.ALL));
}
}