[java-shib-shared] branch main updated: Rename Spring context package.
Scott Cantor
cantor.2 at osu.edu
Wed Sep 14 20:32:41 UTC 2022
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository java-shib-shared.
View the commit online:
http://git.shibboleth.net/view/?p=java-shib-shared.git;a=commit;h=482465a1ffb079d7a7b8f1b7e1511c2f7096462f
The following commit(s) were added to refs/heads/main by this push:
new 482465a1 Rename Spring context package.
482465a1 is described below
commit 482465a1ffb079d7a7b8f1b7e1511c2f7096462f
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Sep 14 16:32:38 2022 -0400
Rename Spring context package.
---
.../shibboleth/shared/cli/AbstractCommandLine.java | 2 +-
.../resource/FileBackedHTTPResourceTest.java | 2 +-
.../context/DelimiterAwareApplicationContext.java | 64 +++++-----------------
.../ext/spring/util/ApplicationContextBuilder.java | 2 +-
.../shibboleth/ext/spring/util/SpringSupport.java | 2 +-
...actPropertiesApplicationContextInitializer.java | 2 +-
...ceholderFileSystemXmlWebApplicationContext.java | 2 +-
.../context/DelimiterAwareApplicationContext.java | 2 +-
.../FileSystemXmlWebApplicationContext.java | 2 +-
.../FilesystemGenericApplicationContext.java | 2 +-
.../FilesystemGenericWebApplicationContext.java | 2 +-
.../spring/context/package-info.java | 2 +-
.../shibboleth/shared/spring/resource/Idp1326.java | 2 +-
13 files changed, 25 insertions(+), 63 deletions(-)
diff --git a/shib-cli/src/main/java/net/shibboleth/shared/cli/AbstractCommandLine.java b/shib-cli/src/main/java/net/shibboleth/shared/cli/AbstractCommandLine.java
index b3ab9c8f..e5421b3e 100644
--- a/shib-cli/src/main/java/net/shibboleth/shared/cli/AbstractCommandLine.java
+++ b/shib-cli/src/main/java/net/shibboleth/shared/cli/AbstractCommandLine.java
@@ -37,8 +37,8 @@ import org.springframework.core.io.support.ResourcePropertySource;
import com.beust.jcommander.JCommander;
-import net.shibboleth.ext.spring.context.FilesystemGenericApplicationContext;
import net.shibboleth.ext.spring.util.ApplicationContextBuilder;
+import net.shibboleth.shared.spring.context.FilesystemGenericApplicationContext;
import net.shibboleth.shared.spring.resource.PreferFileSystemResourceLoader;
import net.shibboleth.utilities.java.support.annotation.constraint.NonnullElements;
import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
diff --git a/shib-networking-spring/src/test/java/net/shibboleth/shared/spring/httpclient/resource/FileBackedHTTPResourceTest.java b/shib-networking-spring/src/test/java/net/shibboleth/shared/spring/httpclient/resource/FileBackedHTTPResourceTest.java
index a58362bf..bc0ed25b 100644
--- a/shib-networking-spring/src/test/java/net/shibboleth/shared/spring/httpclient/resource/FileBackedHTTPResourceTest.java
+++ b/shib-networking-spring/src/test/java/net/shibboleth/shared/spring/httpclient/resource/FileBackedHTTPResourceTest.java
@@ -20,8 +20,8 @@ package net.shibboleth.shared.spring.httpclient.resource;
import java.io.File;
import java.io.IOException;
-import net.shibboleth.ext.spring.context.FilesystemGenericApplicationContext;
import net.shibboleth.ext.spring.util.SchemaTypeAwareXMLBeanDefinitionReader;
+import net.shibboleth.shared.spring.context.FilesystemGenericApplicationContext;
import net.shibboleth.utilities.java.support.httpclient.HttpClientBuilder;
import org.apache.http.client.HttpClient;
diff --git a/shib-spring/src/main/java/net/shibboleth/ext/spring/context/DelimiterAwareApplicationContext.java b/shib-spring/src/main/java/net/shibboleth/ext/spring/context/DelimiterAwareApplicationContext.java
index 7ffe442f..59cf509d 100644
--- a/shib-spring/src/main/java/net/shibboleth/ext/spring/context/DelimiterAwareApplicationContext.java
+++ b/shib-spring/src/main/java/net/shibboleth/ext/spring/context/DelimiterAwareApplicationContext.java
@@ -17,60 +17,22 @@
package net.shibboleth.ext.spring.context;
-import java.io.IOException;
-
-import javax.annotation.Nonnull;
-
-import org.springframework.beans.BeansException;
-import org.springframework.beans.factory.support.DefaultListableBeanFactory;
-import org.springframework.beans.factory.xml.ResourceEntityResolver;
-import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
-import org.springframework.util.StringUtils;
-
-import net.shibboleth.ext.spring.util.SchemaTypeAwareXMLBeanDefinitionReader;
+import net.shibboleth.utilities.java.support.primitive.DeprecationSupport;
+import net.shibboleth.utilities.java.support.primitive.DeprecationSupport.ObjectType;
/**
- * Version of {@link DeferPlaceholderFileSystemXmlWebApplicationContext} which does not necessarily assume that file
- * list are space separated.
+ * This is a stub to preserve compatibility for old web.xml references to this class.
+ *
+ * @deprecated
*/
-public class DelimiterAwareApplicationContext extends DeferPlaceholderFileSystemXmlWebApplicationContext {
-
- /** {@inheritDoc} */
- @Override public void setConfigLocation(final String location) {
- setConfigLocations(StringUtils.tokenizeToStringArray(location, getDelimiters()));
- }
-
- /**
- * Get the delimiters we will split the config locations on. All the usual suspects except space.
- *
- * @return the delimiters
- */
- @Nonnull protected String getDelimiters() {
- return ",;\t\n";
- }
-
- /**
- * {@inheritDoc}
- *
- * The override is necessary to replace the bean definition reader with a non-broken version that honors
- * the context's ResourceLoader instead of supplanting it.
- */
- @Override
- protected void loadBeanDefinitions(final DefaultListableBeanFactory beanFactory)
- throws BeansException, IOException {
- // Create a new XmlBeanDefinitionReader for the given BeanFactory.
- final XmlBeanDefinitionReader beanDefinitionReader = new SchemaTypeAwareXMLBeanDefinitionReader(beanFactory);
-
- // Configure the bean definition reader with this context's
- // resource loading environment.
- beanDefinitionReader.setEnvironment(getEnvironment());
- beanDefinitionReader.setResourceLoader(this);
- beanDefinitionReader.setEntityResolver(new ResourceEntityResolver(this));
-
- // Allow a subclass to provide custom initialization of the reader,
- // then proceed with actually loading the bean definitions.
- initBeanDefinitionReader(beanDefinitionReader);
- loadBeanDefinitions(beanDefinitionReader);
+ at Deprecated(forRemoval=true, since="9.0.0")
+public class DelimiterAwareApplicationContext
+ extends net.shibboleth.shared.spring.context.DelimiterAwareApplicationContext {
+
+ /** Constructor. */
+ public DelimiterAwareApplicationContext() {
+ DeprecationSupport.warn(ObjectType.CLASS, getClass().getName(), "web.xml",
+ net.shibboleth.shared.spring.context.DelimiterAwareApplicationContext.class.getName());
}
}
\ No newline at end of file
diff --git a/shib-spring/src/main/java/net/shibboleth/ext/spring/util/ApplicationContextBuilder.java b/shib-spring/src/main/java/net/shibboleth/ext/spring/util/ApplicationContextBuilder.java
index 7ef3ec30..481f8843 100644
--- a/shib-spring/src/main/java/net/shibboleth/ext/spring/util/ApplicationContextBuilder.java
+++ b/shib-spring/src/main/java/net/shibboleth/ext/spring/util/ApplicationContextBuilder.java
@@ -28,7 +28,6 @@ import java.util.stream.Collectors;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
-import net.shibboleth.ext.spring.context.FilesystemGenericApplicationContext;
import net.shibboleth.shared.spring.config.BooleanToPredicateConverter;
import net.shibboleth.shared.spring.config.FunctionToFunctionConverter;
import net.shibboleth.shared.spring.config.PredicateToPredicateConverter;
@@ -36,6 +35,7 @@ import net.shibboleth.shared.spring.config.StringBooleanToPredicateConverter;
import net.shibboleth.shared.spring.config.StringToDurationConverter;
import net.shibboleth.shared.spring.config.StringToIPRangeConverter;
import net.shibboleth.shared.spring.config.StringToResourceConverter;
+import net.shibboleth.shared.spring.context.FilesystemGenericApplicationContext;
import net.shibboleth.shared.spring.resource.ConditionalResourceResolver;
import net.shibboleth.shared.spring.resource.PreferFileSystemResourceLoader;
import net.shibboleth.utilities.java.support.annotation.constraint.NonnullElements;
diff --git a/shib-spring/src/main/java/net/shibboleth/ext/spring/util/SpringSupport.java b/shib-spring/src/main/java/net/shibboleth/ext/spring/util/SpringSupport.java
index 3ffdd869..317c0c4c 100644
--- a/shib-spring/src/main/java/net/shibboleth/ext/spring/util/SpringSupport.java
+++ b/shib-spring/src/main/java/net/shibboleth/ext/spring/util/SpringSupport.java
@@ -49,7 +49,7 @@ import org.xml.sax.InputSource;
import com.google.common.base.Strings;
import jakarta.servlet.http.HttpServletRequest;
-import net.shibboleth.ext.spring.context.FilesystemGenericApplicationContext;
+import net.shibboleth.shared.spring.context.FilesystemGenericApplicationContext;
import net.shibboleth.utilities.java.support.annotation.constraint.NonnullElements;
import net.shibboleth.utilities.java.support.annotation.constraint.Unmodifiable;
import net.shibboleth.utilities.java.support.logic.Constraint;
diff --git a/shib-spring/src/main/java/net/shibboleth/ext/spring/context/AbstractPropertiesApplicationContextInitializer.java b/shib-spring/src/main/java/net/shibboleth/shared/spring/context/AbstractPropertiesApplicationContextInitializer.java
similarity index 99%
rename from shib-spring/src/main/java/net/shibboleth/ext/spring/context/AbstractPropertiesApplicationContextInitializer.java
rename to shib-spring/src/main/java/net/shibboleth/shared/spring/context/AbstractPropertiesApplicationContextInitializer.java
index cdab6c52..b624169e 100644
--- a/shib-spring/src/main/java/net/shibboleth/ext/spring/context/AbstractPropertiesApplicationContextInitializer.java
+++ b/shib-spring/src/main/java/net/shibboleth/shared/spring/context/AbstractPropertiesApplicationContextInitializer.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package net.shibboleth.ext.spring.context;
+package net.shibboleth.shared.spring.context;
import java.io.File;
import java.io.IOException;
diff --git a/shib-spring/src/main/java/net/shibboleth/ext/spring/context/DeferPlaceholderFileSystemXmlWebApplicationContext.java b/shib-spring/src/main/java/net/shibboleth/shared/spring/context/DeferPlaceholderFileSystemXmlWebApplicationContext.java
similarity index 98%
rename from shib-spring/src/main/java/net/shibboleth/ext/spring/context/DeferPlaceholderFileSystemXmlWebApplicationContext.java
rename to shib-spring/src/main/java/net/shibboleth/shared/spring/context/DeferPlaceholderFileSystemXmlWebApplicationContext.java
index 326d1018..9657cd70 100644
--- a/shib-spring/src/main/java/net/shibboleth/ext/spring/context/DeferPlaceholderFileSystemXmlWebApplicationContext.java
+++ b/shib-spring/src/main/java/net/shibboleth/shared/spring/context/DeferPlaceholderFileSystemXmlWebApplicationContext.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package net.shibboleth.ext.spring.context;
+package net.shibboleth.shared.spring.context;
/**
diff --git a/shib-spring/src/main/java/net/shibboleth/ext/spring/context/DelimiterAwareApplicationContext.java b/shib-spring/src/main/java/net/shibboleth/shared/spring/context/DelimiterAwareApplicationContext.java
similarity index 98%
copy from shib-spring/src/main/java/net/shibboleth/ext/spring/context/DelimiterAwareApplicationContext.java
copy to shib-spring/src/main/java/net/shibboleth/shared/spring/context/DelimiterAwareApplicationContext.java
index 7ffe442f..b9f82128 100644
--- a/shib-spring/src/main/java/net/shibboleth/ext/spring/context/DelimiterAwareApplicationContext.java
+++ b/shib-spring/src/main/java/net/shibboleth/shared/spring/context/DelimiterAwareApplicationContext.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package net.shibboleth.ext.spring.context;
+package net.shibboleth.shared.spring.context;
import java.io.IOException;
diff --git a/shib-spring/src/main/java/net/shibboleth/ext/spring/context/FileSystemXmlWebApplicationContext.java b/shib-spring/src/main/java/net/shibboleth/shared/spring/context/FileSystemXmlWebApplicationContext.java
similarity index 98%
rename from shib-spring/src/main/java/net/shibboleth/ext/spring/context/FileSystemXmlWebApplicationContext.java
rename to shib-spring/src/main/java/net/shibboleth/shared/spring/context/FileSystemXmlWebApplicationContext.java
index ee44fa6f..835239a2 100644
--- a/shib-spring/src/main/java/net/shibboleth/ext/spring/context/FileSystemXmlWebApplicationContext.java
+++ b/shib-spring/src/main/java/net/shibboleth/shared/spring/context/FileSystemXmlWebApplicationContext.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package net.shibboleth.ext.spring.context;
+package net.shibboleth.shared.spring.context;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.core.io.ClassPathResource;
diff --git a/shib-spring/src/main/java/net/shibboleth/ext/spring/context/FilesystemGenericApplicationContext.java b/shib-spring/src/main/java/net/shibboleth/shared/spring/context/FilesystemGenericApplicationContext.java
similarity index 98%
rename from shib-spring/src/main/java/net/shibboleth/ext/spring/context/FilesystemGenericApplicationContext.java
rename to shib-spring/src/main/java/net/shibboleth/shared/spring/context/FilesystemGenericApplicationContext.java
index a5f6edbd..6df14c97 100644
--- a/shib-spring/src/main/java/net/shibboleth/ext/spring/context/FilesystemGenericApplicationContext.java
+++ b/shib-spring/src/main/java/net/shibboleth/shared/spring/context/FilesystemGenericApplicationContext.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package net.shibboleth.ext.spring.context;
+package net.shibboleth.shared.spring.context;
import net.shibboleth.ext.spring.util.AnnotationParameterNameDiscoverer;
import net.shibboleth.shared.spring.resource.ConditionalResourceResolver;
diff --git a/shib-spring/src/main/java/net/shibboleth/ext/spring/context/FilesystemGenericWebApplicationContext.java b/shib-spring/src/main/java/net/shibboleth/shared/spring/context/FilesystemGenericWebApplicationContext.java
similarity index 98%
rename from shib-spring/src/main/java/net/shibboleth/ext/spring/context/FilesystemGenericWebApplicationContext.java
rename to shib-spring/src/main/java/net/shibboleth/shared/spring/context/FilesystemGenericWebApplicationContext.java
index afef8b4f..37d922bd 100644
--- a/shib-spring/src/main/java/net/shibboleth/ext/spring/context/FilesystemGenericWebApplicationContext.java
+++ b/shib-spring/src/main/java/net/shibboleth/shared/spring/context/FilesystemGenericWebApplicationContext.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package net.shibboleth.ext.spring.context;
+package net.shibboleth.shared.spring.context;
import net.shibboleth.ext.spring.util.AnnotationParameterNameDiscoverer;
import net.shibboleth.shared.spring.resource.ConditionalResourceResolver;
diff --git a/shib-spring/src/main/java/net/shibboleth/ext/spring/context/package-info.java b/shib-spring/src/main/java/net/shibboleth/shared/spring/context/package-info.java
similarity index 95%
rename from shib-spring/src/main/java/net/shibboleth/ext/spring/context/package-info.java
rename to shib-spring/src/main/java/net/shibboleth/shared/spring/context/package-info.java
index a51a128a..dd9081ef 100644
--- a/shib-spring/src/main/java/net/shibboleth/ext/spring/context/package-info.java
+++ b/shib-spring/src/main/java/net/shibboleth/shared/spring/context/package-info.java
@@ -18,4 +18,4 @@
/**
* Spring application context classes.
*/
-package net.shibboleth.ext.spring.context;
\ No newline at end of file
+package net.shibboleth.shared.spring.context;
\ No newline at end of file
diff --git a/shib-spring/src/test/java/net/shibboleth/shared/spring/resource/Idp1326.java b/shib-spring/src/test/java/net/shibboleth/shared/spring/resource/Idp1326.java
index 8030ff06..d69cdded 100644
--- a/shib-spring/src/test/java/net/shibboleth/shared/spring/resource/Idp1326.java
+++ b/shib-spring/src/test/java/net/shibboleth/shared/spring/resource/Idp1326.java
@@ -32,8 +32,8 @@ import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
-import net.shibboleth.ext.spring.context.FilesystemGenericApplicationContext;
import net.shibboleth.ext.spring.util.SchemaTypeAwareXMLBeanDefinitionReader;
+import net.shibboleth.shared.spring.context.FilesystemGenericApplicationContext;
@SuppressWarnings("javadoc")
public class Idp1326{
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list