private int firstFalseIndex(boolean[] inputCheck) {
    if (inputCheck != null) {
      for (int i = 0; i < inputCheck.length; i++) {
        if (!inputCheck[i]) {
          return i;
        }
      }
    }
    return -1;
  }
try to match an array of privileges from user/groups/roles grants.
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/BitSetCheckedAuthorizationProvider.java