You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by ju...@apache.org on 2020/03/29 09:39:19 UTC
[jspwiki] 19/36: add deepClone operation
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit 2992073ac9e042b1183ef85c45ec76dbd4af80d6
Author: juanpablo <ju...@apache.org>
AuthorDate: Sat Mar 28 00:43:27 2020 +0100
add deepClone operation
---
jspwiki-api/src/main/java/org/apache/wiki/api/core/Context.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/jspwiki-api/src/main/java/org/apache/wiki/api/core/Context.java b/jspwiki-api/src/main/java/org/apache/wiki/api/core/Context.java
index 6846b9b..04ebca9 100644
--- a/jspwiki-api/src/main/java/org/apache/wiki/api/core/Context.java
+++ b/jspwiki-api/src/main/java/org/apache/wiki/api/core/Context.java
@@ -252,6 +252,15 @@ public interface Context extends Cloneable, Command {
Context clone();
/**
+ * Creates a deep clone of the Context. This is useful when you want to be sure that you don't accidentally mess with page
+ * attributes, etc.
+ *
+ * @since 2.8.0
+ * @return A deep clone of the Context.
+ */
+ Context deepClone();
+
+ /**
* This method can be used to find the WikiContext programmatically from a JSP PageContext. We check the request context.
* The wiki context, if it exists, is looked up using the key {@link #ATTR_CONTEXT}.
*