[java-identity-provider] branch main updated: IDP-1776 - Installer failure on missing "additional" property files

Scott Cantor cantor.2 at osu.edu
Mon Mar 15 12:22:06 UTC 2021


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch main
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=6e832ac9c764b9edccc44227c1cb55451e1bd25f

The following commit(s) were added to refs/heads/main by this push:
       new  6e832ac9c IDP-1776 - Installer failure on missing "additional" property files
6e832ac9c is described below

commit 6e832ac9c764b9edccc44227c1cb55451e1bd25f
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Mar 15 08:22:02 2021 -0400

    IDP-1776 - Installer failure on missing "additional" property files
    
    https://issues.shibboleth.net/jira/browse/IDP-1776
---
 .../idp/installer/impl/CurrentInstallStateImpl.java     | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/CurrentInstallStateImpl.java b/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/CurrentInstallStateImpl.java
index 025a2c928..d7111c4ca 100644
--- a/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/CurrentInstallStateImpl.java
+++ b/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/CurrentInstallStateImpl.java
@@ -146,12 +146,17 @@ public final class CurrentInstallStateImpl extends AbstractInitializableComponen
                 targetDir.toString(), props);
         for (final String source : additionalSources) {
             final Path path = Path.of(source);
-            try {
-                final InputStream stream = new FileInputStream(path.toFile());
-                props.load(stream);
-            } catch (final IOException e) {
-                log.error("Error loading {}", path, e);
-                throw new ComponentInitializationException(e);
+            if (Files.exists(path)) {
+                try {
+                    final InputStream stream = new FileInputStream(path.toFile());
+                    props.load(stream);
+                } catch (final IOException e) {
+                    log.error("Error loading {}", path, e);
+                    throw new ComponentInitializationException(e);
+                }
+            } else {
+                log.warn("Unable to find property resource '{}' (check {}?)", path,
+                        IdPPropertiesApplicationContextInitializer.IDP_ADDITIONAL_PROPERTY);
             }
         }
     }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list