[java-identity-provider COMMIT] /trunk/idp-core/src/main/java/net/shibboleth/idp/spring/IdPPropertiesApplicationConte...

noreply at shibboleth.net noreply at shibboleth.net
Wed Nov 4 11:09:03 EST 2015


Author: tzeller
Date: Wed Nov  4 11:09:03 2015
New Revision: 7930

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=7930&view=rev
Log:
IDP-812 - Deprecate normalizePath() in the app ctx initializer.

Deprecate normalizePath() because (a) we normalize a system default value rather than a user supplied value, (b) we just wrap a Spring utility, and (c) to do anything with the normalized value we would need to prepend the relevant property.

Modified:
    trunk/idp-core/src/main/java/net/shibboleth/idp/spring/IdPPropertiesApplicationContextInitializer.java

Modified: trunk/idp-core/src/main/java/net/shibboleth/idp/spring/IdPPropertiesApplicationContextInitializer.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-core/src/main/java/net/shibboleth/idp/spring/IdPPropertiesApplicationContextInitializer.java?rev=7930&r1=7929&r2=7930&view=diff
==============================================================================
--- trunk/idp-core/src/main/java/net/shibboleth/idp/spring/IdPPropertiesApplicationContextInitializer.java	(original)
+++ trunk/idp-core/src/main/java/net/shibboleth/idp/spring/IdPPropertiesApplicationContextInitializer.java	Wed Nov  4 11:09:03 2015
@@ -227,10 +227,12 @@
     /**
      * Normalize the path by calling {@link StringUtils#cleanPath(String)}.
      * 
+     * @deprecated
+     * 
      * @param path the input path
      * @return the normalized path.
      */
-    @Nonnull public String normalizePath(@Nonnull final String path) {
+    @Deprecated @Nonnull public String normalizePath(@Nonnull final String path) {
         Constraint.isNotNull(path, "Path cannot be null");
         final String normalized = StringUtils.cleanPath(path);
         log.debug("Normalized path '{}' to '{}'", path, normalized);
@@ -238,10 +240,7 @@
     }
 
     /**
-     * 
      * Set the {@link #IDP_HOME_PROPERTY} property to the given path if not already set.
-     * 
-     * The property value will be normalized by calling {@link #normalizePath(String)}.
      * 
      * @param path the property value
      * @param properties the properties
@@ -255,11 +254,9 @@
             return;
         }
 
-        final String normalizedPath = normalizePath(path);
-
-        log.debug("Setting '{}' property to '{}'", IDP_HOME_PROPERTY, normalizedPath);
-
-        properties.setProperty(IDP_HOME_PROPERTY, normalizedPath);
+        log.debug("Setting '{}' property to '{}'", IDP_HOME_PROPERTY, path);
+
+        properties.setProperty(IDP_HOME_PROPERTY, path);
     }
 
 }



More information about the commits mailing list