private void registerDefaultValidatorIds(Application application,LinkedHashSet<String> defaultValidatorIds){
  if (defaultValidatorIds == null) {
    defaultValidatorIds=new LinkedHashSet<>();
    if (isBeanValidatorAvailable()) {
      WebConfiguration webConfig=WebConfiguration.getInstance();
      if (!webConfig.isOptionEnabled(WebConfiguration.BooleanWebContextInitParameter.DisableDefaultBeanValidator)) {
        defaultValidatorIds.add(BeanValidator.VALIDATOR_ID);
      }
    }
  }
  for (  String validatorId : defaultValidatorIds) {
    if (LOGGER.isLoggable(Level.FINE)) {
      LOGGER.log(Level.FINE,MessageFormat.format("Calling Application.addDefaultValidatorId({0})",validatorId));
    }
    application.addDefaultValidatorId(validatorId);
  }
}

private void registerDefaultValidatorIds ( Application application , LinkedHashSet < String > defaultValidatorIds ) { if ( defaultValidatorIds == null ) { defaultValidatorIds = new LinkedHashSet < > ( ) ; if ( isBeanValidatorAvailable ( ) ) { WebConfiguration webConfig = WebConfiguration . getInstance ( ) ; if ( ! webConfig . isOptionEnabled ( WebConfiguration . BooleanWebContextInitParameter . DisableDefaultBeanValidator ) ) { defaultValidatorIds . add ( BeanValidator . VALIDATOR_ID ) ; } } } for ( String validatorId : defaultValidatorIds ) { if ( LOGGER . isLoggable ( Level . FINE ) ) { LOGGER . log ( Level . FINE , MessageFormat . format ( "Calling Application.addDefaultValidatorId({0})" , validatorId ) ) ; } application . addDefaultValidatorId ( validatorId ) ; } }
if defaultvalidatorids is null , then no & lt ; default - validators & gt ; element appeared in any configuration file . in that case , add javax . faces . bean if bean validation is available . if the & lt ; default - validators & gt ; appeared at least once , don ' t add the default ( and empty & lt ; default - validator & gt ; element disabled default validators )
