code: public void setCredentials(final String user, final String pw) {
      if (user == null) {
        credentials = null;
      } else {
        credentials = new UsernamePasswordCredentials(user, pw);
      }
    }
docs: Set the credentials. user == null for unauthenticated.
  
  @param user
  @param pw