This is an automated email from the ASF dual-hosted git repository. schultz pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 2a7c0195108664779d52c0155b9444776e40fe3c Author: Christopher Schultz <ch...@christopherschultz.net> AuthorDate: Wed Oct 18 21:31:05 2023 -0400 Fail faster if a file does not exist. --- .../apache/tomcat/util/digester/ServiceBindingPropertySource.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/java/org/apache/tomcat/util/digester/ServiceBindingPropertySource.java b/java/org/apache/tomcat/util/digester/ServiceBindingPropertySource.java index fb332bd8b2..1ae9528609 100644 --- a/java/org/apache/tomcat/util/digester/ServiceBindingPropertySource.java +++ b/java/org/apache/tomcat/util/digester/ServiceBindingPropertySource.java @@ -89,6 +89,11 @@ public class ServiceBindingPropertySource implements IntrospectionUtils.Property } Path path = Paths.get(serviceBindingRoot, parts[0], parts[1]); + + if (!path.toFile().exists()) { + return null; + } + try { return new String(Files.readAllBytes(path)); } catch (IOException e) { --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org