public static String sanitizeAppIdentifier(String appIdentifier) throws IllegalArgumentException {
  if (appIdentifier == null) {
    throw new IllegalArgumentException("App Key must not be null.");
  }
  String sAppIdentifier=appIdentifier.trim();
  if (sAppIdentifier.length() != APP_IDENTIFIER_LENGTH) {
    throw new IllegalArgumentException("App Key length must be " + APP_IDENTIFIER_LENGTH + " characters.");
  }
  return sAppIdentifier;
}

public static String sanitizeAppIdentifier ( String appIdentifier ) throws IllegalArgumentException { if ( appIdentifier == null ) { throw new IllegalArgumentException ( "App Key must not be null." ) ; } String sAppIdentifier = appIdentifier . trim ( ) ; if ( sAppIdentifier . length ( ) != APP_IDENTIFIER_LENGTH ) { throw new IllegalArgumentException ( "App Key length must be " + APP_IDENTIFIER_LENGTH + " characters." ) ; } return sAppIdentifier ; }
sanitizes an app identifier or throws an exception if it can ' t be sanitized .
