diff --git a/impl/src/main/java/com/sun/faces/config/processor/ApplicationConfigProcessor.java b/impl/src/main/java/com/sun/faces/config/processor/ApplicationConfigProcessor.java index 9b8824268c..5af54f0b58 100644 --- a/impl/src/main/java/com/sun/faces/config/processor/ApplicationConfigProcessor.java +++ b/impl/src/main/java/com/sun/faces/config/processor/ApplicationConfigProcessor.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2024 Contributors to Eclipse Foundation. * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -333,7 +334,7 @@ private void destroyInstances(ServletContext sc, FacesContext facesContext, List /** * If defaultValidatorIds is null, then no <default-validators> element appeared in any configuration file. In - * that case, add jakarta.faces.Bean if Bean Validation is available. If the <default-validators> appeared at + * that case, add jakarta.faces.Bean if Jakarta Validation is available. If the <default-validators> appeared at * least once, don't add the default (and empty <default-validator> element disabled default validators) */ private void registerDefaultValidatorIds(FacesContext facesContext, Application application, LinkedHashSet defaultValidatorIds) { @@ -390,22 +391,19 @@ static boolean isBeanValidatorAvailable(FacesContext facesContext) { result = true; } } catch (NamingException root) { - LOGGER.fine(() -> "Could not build a default Bean Validator factory: " + root.getMessage()); + LOGGER.fine(() -> "Could not build a default Jakarta Validation ValidatorFactory: " + root.getMessage()); } if (!result) { - try { - ValidatorFactory factory = Validation.buildDefaultValidatorFactory(); - factory.getValidator(); - appMap.put(BeanValidator.VALIDATOR_FACTORY_KEY, factory); - result = true; - } catch (Throwable throwable) { - } + ValidatorFactory factory = Validation.buildDefaultValidatorFactory(); + factory.getValidator(); + appMap.put(BeanValidator.VALIDATOR_FACTORY_KEY, factory); + result = true; } } } catch (Throwable t) { // CNFE or ValidationException or any other - LOGGER.fine("Unable to load Beans Validation"); + LOGGER.fine("Unable to load Jakarta Validation"); } appMap.put(beansValidationAvailabilityCacheKey, result);