public Subject login(String username,String password){
  if (StringUtils.isBlank(username) || StringUtils.isBlank(password))   return null;
  Properties credentials=new Properties();
  credentials.setProperty(ResourceConstants.USER_NAME,username);
  credentials.setProperty(ResourceConstants.PASSWORD,password);
  return login(credentials);
}

public Subject login ( String username , String password ) { if ( StringUtils . isBlank ( username ) || StringUtils . isBlank ( password ) ) return null ; Properties credentials = new Properties ( ) ; credentials . setProperty ( ResourceConstants . USER_NAME , username ) ; credentials . setProperty ( ResourceConstants . PASSWORD , password ) ; return login ( credentials ) ; }
convenient method for testing
