Skip to content

Commit

Permalink
No need to swallow exception at that point.
Browse files Browse the repository at this point in the history
There's an outer catch that will log it.

Signed-off-by: Arjan Tijms <arjan.tijms@omnifish.ee>
  • Loading branch information
arjantijms committed Feb 20, 2024
1 parent 5f3bce0 commit cc02e5d
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -394,13 +395,10 @@ static boolean isBeanValidatorAvailable(FacesContext facesContext) {
}

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;
}
}

Expand Down

0 comments on commit cc02e5d

Please sign in to comment.