@Override
  public String getPassword(Configuration conf, String name) throws IOException {
    if (getPasswordMethod == null) {
      // Just retrieve value from conf
      return conf.get(name);
    } else {
      try {
        char[] pw = (char[]) getPasswordMethod.invoke(conf, name);
        if (pw == null) {
          return null;
        }
        return new String(pw);
      } catch (Exception err) {
        throw new IOException(err.getMessage(), err);
      }
    }
  }
If there is an AccessException buried somewhere in the chain of failures, wrap the original
exception in an AccessException. Othewise just return the original exception.
shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java