You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by ku...@apache.org on 2023/11/14 13:30:33 UTC
(struts) 03/10: WW-5343 Extract deprecated methods as default interface methods
This is an automated email from the ASF dual-hosted git repository.
kusal pushed a commit to branch WW-5343-sec-extend
in repository https://gitbox.apache.org/repos/asf/struts.git
commit b0b80bac77fac56a019f3c4f5b8bad9e9bf42c01
Author: Kusal Kithul-Godage <gi...@kusal.io>
AuthorDate: Wed Nov 15 00:19:47 2023 +1100
WW-5343 Extract deprecated methods as default interface methods
---
.../main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java | 10 ----------
.../com/opensymphony/xwork2/util/MemberAccessValueStack.java | 8 ++++++--
2 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java
index 69802c5c2..90846f5fe 100644
--- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java
+++ b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java
@@ -482,20 +482,10 @@ public class OgnlValueStack implements Serializable, ValueStack, ClearableValueS
((OgnlContext) context).getValues().clear();
}
- @Deprecated
- public void setAcceptProperties(Set<Pattern> acceptedProperties) {
- securityMemberAccess.useAcceptProperties(acceptedProperties);
- }
-
public void useAcceptProperties(Set<Pattern> acceptedProperties) {
securityMemberAccess.useAcceptProperties(acceptedProperties);
}
- @Deprecated
- public void setExcludeProperties(Set<Pattern> excludeProperties) {
- securityMemberAccess.useExcludeProperties(excludeProperties);
- }
-
public void useExcludeProperties(Set<Pattern> excludeProperties) {
securityMemberAccess.useExcludeProperties(excludeProperties);
}
diff --git a/core/src/main/java/com/opensymphony/xwork2/util/MemberAccessValueStack.java b/core/src/main/java/com/opensymphony/xwork2/util/MemberAccessValueStack.java
index 86b39f480..de222be97 100644
--- a/core/src/main/java/com/opensymphony/xwork2/util/MemberAccessValueStack.java
+++ b/core/src/main/java/com/opensymphony/xwork2/util/MemberAccessValueStack.java
@@ -31,7 +31,9 @@ public interface MemberAccessValueStack {
* @deprecated please use {@link #useExcludeProperties(Set)}
*/
@Deprecated
- void setExcludeProperties(Set<Pattern> excludeProperties);
+ default void setExcludeProperties(Set<Pattern> excludeProperties) {
+ useExcludeProperties(excludeProperties);
+ }
void useExcludeProperties(Set<Pattern> excludeProperties);
@@ -39,7 +41,9 @@ public interface MemberAccessValueStack {
* @deprecated please use {@link #useAcceptProperties(Set)}
*/
@Deprecated
- void setAcceptProperties(Set<Pattern> acceptedProperties);
+ default void setAcceptProperties(Set<Pattern> acceptedProperties) {
+ useAcceptProperties(acceptedProperties);
+ }
void useAcceptProperties(Set<Pattern> acceptedProperties);