[java-identity-provider] branch main updated: IDP-1888 - Add duplicate property detection to the context initializer

Scott Cantor cantor.2 at osu.edu
Thu Mar 17 22:54:52 UTC 2022


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=6d78edb5a60f9b8db909c05a6e701629f286a867

The following commit(s) were added to refs/heads/main by this push:
     new 6d78edb5a IDP-1888 - Add duplicate property detection to the context initializer
6d78edb5a is described below

commit 6d78edb5a60f9b8db909c05a6e701629f286a867
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu Mar 17 18:54:46 2022 -0400

    IDP-1888 - Add duplicate property detection to the context initializer
    
    https://shibboleth.atlassian.net/browse/IDP-1888
    
    Convert path-based check to string to fix duplicate property detection.
---
 .../idp/spring/IdPPropertiesApplicationContextInitializer.java        | 4 ++--
 idp-distribution/src/main/resources/bin/install-log.xml               | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/idp-core/src/main/java/net/shibboleth/idp/spring/IdPPropertiesApplicationContextInitializer.java b/idp-core/src/main/java/net/shibboleth/idp/spring/IdPPropertiesApplicationContextInitializer.java
index d84600625..f23d45575 100644
--- a/idp-core/src/main/java/net/shibboleth/idp/spring/IdPPropertiesApplicationContextInitializer.java
+++ b/idp-core/src/main/java/net/shibboleth/idp/spring/IdPPropertiesApplicationContextInitializer.java
@@ -123,7 +123,7 @@ public class IdPPropertiesApplicationContextInitializer
                 return;
             }
 
-            if ("classpath:".equals(searchLocation) || (resource instanceof ClassPathResource)) {
+            if ("classpath:".equals(searchLocation) || resource instanceof ClassPathResource) {
                 setIdPHomeProperty(searchLocation, properties);
             } else {
                 String searchLocationAbsolutePath = Paths.get(searchLocation).toAbsolutePath().toString();
@@ -244,7 +244,7 @@ public class IdPPropertiesApplicationContextInitializer
                        new BiPredicate<Path,BasicFileAttributes>() {
                                public boolean test(final Path t, final BasicFileAttributes u) {
                                    if (u.isRegularFile() && t.getFileName().toString().endsWith(".properties")
-                                           && !t.endsWith(Path.of(IDP_PROPERTIES))) {
+                                           && !t.toString().endsWith(IDP_PROPERTIES)) {
                                        LOG.debug("Including auto-located properties in {}", t);
                                        return true;
                                    }
diff --git a/idp-distribution/src/main/resources/bin/install-log.xml b/idp-distribution/src/main/resources/bin/install-log.xml
index 07c93d327..b739038e9 100644
--- a/idp-distribution/src/main/resources/bin/install-log.xml
+++ b/idp-distribution/src/main/resources/bin/install-log.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Logging for the installer.  Pin to Debug for now -->
+<!-- Logging for the installer. -->
 <configuration>
 
     <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">

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


More information about the commits mailing list