private String[] checkCredentials(Object credentials){
  if (!(credentials instanceof String[])) {
    if (credentials == null) {
      throw new SecurityException("Credentials required");
    }
    throw new SecurityException("Credentials should be String[]");
  }
  final String[] aCredentials=(String[])credentials;
  return aCredentials;
}

private String [ ] checkCredentials ( Object credentials ) { if ( ! ( credentials instanceof String [ ] ) ) { if ( credentials == null ) { throw new SecurityException ( "Credentials required" ) ; } throw new SecurityException ( "Credentials should be String[]" ) ; } final String [ ] aCredentials = ( String [ ] ) credentials ; return aCredentials ; }
check credentials are ok
