[java-support] branch maint-8 updated: IDP-2042 - Finalize deprecation of HttpServletXXX proxies
Scott Cantor
cantor.2 at osu.edu
Wed Nov 30 15:14:31 UTC 2022
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch maint-8
in repository java-support.
View the commit online:
http://git.shibboleth.net/view/?p=java-support.git;a=commit;h=17c0cf6a94695a8ca82f6a6348649382ea85fed8
The following commit(s) were added to refs/heads/maint-8 by this push:
new 17c0cf6 IDP-2042 - Finalize deprecation of HttpServletXXX proxies
17c0cf6 is described below
commit 17c0cf6a94695a8ca82f6a6348649382ea85fed8
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Nov 30 10:13:56 2022 -0500
IDP-2042 - Finalize deprecation of HttpServletXXX proxies
https://shibboleth.atlassian.net/browse/IDP-2042
Add new warning-emitting proxies for deployers.
Remove warning from original classes.
---
.../java/support/net/ThreadLocalHttpServletRequestProxy.java | 3 ---
.../java/support/net/ThreadLocalHttpServletResponseProxy.java | 3 ---
.../net/{ => impl}/ThreadLocalHttpServletRequestProxy.java | 8 +++++++-
.../net/{ => impl}/ThreadLocalHttpServletResponseProxy.java | 8 +++++++-
4 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/src/main/java/net/shibboleth/utilities/java/support/net/ThreadLocalHttpServletRequestProxy.java b/src/main/java/net/shibboleth/utilities/java/support/net/ThreadLocalHttpServletRequestProxy.java
index a5f038b..8f9bc4e 100644
--- a/src/main/java/net/shibboleth/utilities/java/support/net/ThreadLocalHttpServletRequestProxy.java
+++ b/src/main/java/net/shibboleth/utilities/java/support/net/ThreadLocalHttpServletRequestProxy.java
@@ -42,8 +42,6 @@ import javax.servlet.http.HttpUpgradeHandler;
import javax.servlet.http.Part;
import net.shibboleth.utilities.java.support.logic.Constraint;
-import net.shibboleth.utilities.java.support.primitive.DeprecationSupport;
-import net.shibboleth.utilities.java.support.primitive.DeprecationSupport.ObjectType;
/**
* An implementation of {@link HttpServletRequest} which serves as a proxy for the
@@ -408,7 +406,6 @@ public class ThreadLocalHttpServletRequestProxy implements HttpServletRequest {
* @return the current request
*/
protected HttpServletRequest getCurrent() {
- DeprecationSupport.warn(ObjectType.BEAN, "shibboleth.HttpServletRequest", null, "shibboleth.HttpServletRequestSupplier");
return Constraint.isNotNull(HttpServletRequestResponseContext.getRequest(),
"Current HttpServletRequest has not been loaded via HttpServletRequestResponseContext");
}
diff --git a/src/main/java/net/shibboleth/utilities/java/support/net/ThreadLocalHttpServletResponseProxy.java b/src/main/java/net/shibboleth/utilities/java/support/net/ThreadLocalHttpServletResponseProxy.java
index d1842cc..00abac7 100644
--- a/src/main/java/net/shibboleth/utilities/java/support/net/ThreadLocalHttpServletResponseProxy.java
+++ b/src/main/java/net/shibboleth/utilities/java/support/net/ThreadLocalHttpServletResponseProxy.java
@@ -27,8 +27,6 @@ import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletResponse;
import net.shibboleth.utilities.java.support.logic.Constraint;
-import net.shibboleth.utilities.java.support.primitive.DeprecationSupport;
-import net.shibboleth.utilities.java.support.primitive.DeprecationSupport.ObjectType;
/**
* An implementation of {@link HttpServletResponse} which serves as a proxy for the
@@ -233,7 +231,6 @@ public class ThreadLocalHttpServletResponseProxy implements HttpServletResponse
* @return the current response
*/
protected HttpServletResponse getCurrent() {
- DeprecationSupport.warn(ObjectType.BEAN, "shibboleth.HttpServletResponse", null, "shibboleth.HttpServletRespoonseSupplier");
return Constraint.isNotNull(HttpServletRequestResponseContext.getResponse(),
"Current HttpServletResponse has not been loaded via HttpServletRequestResponseContext");
}
diff --git a/src/main/java/net/shibboleth/utilities/java/support/net/ThreadLocalHttpServletRequestProxy.java b/src/main/java/net/shibboleth/utilities/java/support/net/impl/ThreadLocalHttpServletRequestProxy.java
similarity index 95%
copy from src/main/java/net/shibboleth/utilities/java/support/net/ThreadLocalHttpServletRequestProxy.java
copy to src/main/java/net/shibboleth/utilities/java/support/net/impl/ThreadLocalHttpServletRequestProxy.java
index a5f038b..f9106ad 100644
--- a/src/main/java/net/shibboleth/utilities/java/support/net/ThreadLocalHttpServletRequestProxy.java
+++ b/src/main/java/net/shibboleth/utilities/java/support/net/impl/ThreadLocalHttpServletRequestProxy.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package net.shibboleth.utilities.java.support.net;
+package net.shibboleth.utilities.java.support.net.impl;
import java.io.BufferedReader;
import java.io.IOException;
@@ -42,6 +42,8 @@ import javax.servlet.http.HttpUpgradeHandler;
import javax.servlet.http.Part;
import net.shibboleth.utilities.java.support.logic.Constraint;
+import net.shibboleth.utilities.java.support.net.HttpServletRequestResponseContext;
+import net.shibboleth.utilities.java.support.net.ThreadLocalHttpServletRequestSupplier;
import net.shibboleth.utilities.java.support.primitive.DeprecationSupport;
import net.shibboleth.utilities.java.support.primitive.DeprecationSupport.ObjectType;
@@ -52,6 +54,10 @@ import net.shibboleth.utilities.java.support.primitive.DeprecationSupport.Object
* <p>This should be avoided in place of {@link ThreadLocalHttpServletRequestSupplier} which
* indirects the access to the interface.</p>
*
+ * <p>This copy of the class contains the deprecation warning and will be used within Shibboleth
+ * software so deployers note it. The original classes do not warn and prevent any of our
+ * deployed code using the original classes from emitting the warnings.</p>
+ *
* @deprecated
*/
@Deprecated(since="8.4.0", forRemoval=true)
diff --git a/src/main/java/net/shibboleth/utilities/java/support/net/ThreadLocalHttpServletResponseProxy.java b/src/main/java/net/shibboleth/utilities/java/support/net/impl/ThreadLocalHttpServletResponseProxy.java
similarity index 93%
copy from src/main/java/net/shibboleth/utilities/java/support/net/ThreadLocalHttpServletResponseProxy.java
copy to src/main/java/net/shibboleth/utilities/java/support/net/impl/ThreadLocalHttpServletResponseProxy.java
index d1842cc..14a2a6c 100644
--- a/src/main/java/net/shibboleth/utilities/java/support/net/ThreadLocalHttpServletResponseProxy.java
+++ b/src/main/java/net/shibboleth/utilities/java/support/net/impl/ThreadLocalHttpServletResponseProxy.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package net.shibboleth.utilities.java.support.net;
+package net.shibboleth.utilities.java.support.net.impl;
import java.io.IOException;
import java.io.PrintWriter;
@@ -27,6 +27,8 @@ import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletResponse;
import net.shibboleth.utilities.java.support.logic.Constraint;
+import net.shibboleth.utilities.java.support.net.HttpServletRequestResponseContext;
+import net.shibboleth.utilities.java.support.net.ThreadLocalHttpServletResponseSupplier;
import net.shibboleth.utilities.java.support.primitive.DeprecationSupport;
import net.shibboleth.utilities.java.support.primitive.DeprecationSupport.ObjectType;
@@ -37,6 +39,10 @@ import net.shibboleth.utilities.java.support.primitive.DeprecationSupport.Object
* <p>This should be avoided in place of {@link ThreadLocalHttpServletResponseSupplier} which
* indirects the access to the interface.</p>
*
+ * <p>This copy of the class contains the deprecation warning and will be used within Shibboleth
+ * software so deployers note it. The original classes do not warn and prevent any of our
+ * deployed code using the original classes from emitting the warnings.</p>
+ *
* @deprecated
*/
@Deprecated(since="8.4.0", forRemoval=true)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list