From ed8dc577b7e6c4fa02cba853c62f82b2e3b0ed15 Mon Sep 17 00:00:00 2001 From: Aleksandr Mashchenko Date: Wed, 25 Nov 2015 09:01:20 +0200 Subject: [PATCH] WW-4571 Drops deprecated escape attribute in property tag --- .../java/org/apache/struts2/components/Property.java | 10 ++++------ .../java/org/apache/struts2/views/jsp/PropertyTag.java | 8 ++------ core/src/site/resources/tags/property.html | 8 -------- .../org/apache/struts2/views/jsp/PropertyTagTest.java | 6 +++--- 4 files changed, 9 insertions(+), 23 deletions(-) diff --git a/core/src/main/java/org/apache/struts2/components/Property.java b/core/src/main/java/org/apache/struts2/components/Property.java index 6baba581c..9d2c2b6d5 100644 --- a/core/src/main/java/org/apache/struts2/components/Property.java +++ b/core/src/main/java/org/apache/struts2/components/Property.java @@ -43,7 +43,10 @@ import java.io.Writer; * * * @@ -102,11 +105,6 @@ public class Property extends Component { this.defaultValue = defaultValue; } - @StrutsTagAttribute(description="Deprecated. Use 'escapeHtml'. Whether to escape HTML", type="Boolean", defaultValue="true") - public void setEscape(boolean escape) { - this.escapeHtml = escape; - } - @StrutsTagAttribute(description="Whether to escape HTML", type="Boolean", defaultValue="true") public void setEscapeHtml(boolean escape) { this.escapeHtml = escape; diff --git a/core/src/main/java/org/apache/struts2/views/jsp/PropertyTag.java b/core/src/main/java/org/apache/struts2/views/jsp/PropertyTag.java index 6176e49ba..560bc7b91 100644 --- a/core/src/main/java/org/apache/struts2/views/jsp/PropertyTag.java +++ b/core/src/main/java/org/apache/struts2/views/jsp/PropertyTag.java @@ -53,8 +53,8 @@ public class PropertyTag extends ComponentTagSupport { Property tag = (Property) component; tag.setDefault(defaultValue); - tag.setValue(value); - tag.setEscape(escapeHtml); + tag.setValue(value); + tag.setEscapeHtml(escapeHtml); tag.setEscapeJavaScript(escapeJavaScript); tag.setEscapeXml(escapeXml); tag.setEscapeCsv(escapeCsv); @@ -64,10 +64,6 @@ public class PropertyTag extends ComponentTagSupport { this.defaultValue = defaultValue; } - public void setEscape(boolean escape) { - this.escapeHtml = escape; - } - public void setEscapeHtml(boolean escapeHtml) { this.escapeHtml = escapeHtml; } diff --git a/core/src/site/resources/tags/property.html b/core/src/site/resources/tags/property.html index 033984d57..db893a0a5 100644 --- a/core/src/site/resources/tags/property.html +++ b/core/src/site/resources/tags/property.html @@ -41,14 +41,6 @@ Please do not edit it directly. String The default value to be used if value attribute is null - - escape - false - true - false - Boolean - Deprecated. Use 'escapeHtml'. Whether to escape HTML - escapeCsv false diff --git a/core/src/test/java/org/apache/struts2/views/jsp/PropertyTagTest.java b/core/src/test/java/org/apache/struts2/views/jsp/PropertyTagTest.java index a2b77ba8c..89c7925b9 100644 --- a/core/src/test/java/org/apache/struts2/views/jsp/PropertyTagTest.java +++ b/core/src/test/java/org/apache/struts2/views/jsp/PropertyTagTest.java @@ -211,7 +211,7 @@ public class PropertyTagTest extends StrutsInternalTestCase { // test {PropertyTag tag = new PropertyTag(); - tag.setEscape(false); + tag.setEscapeHtml(false); tag.setEscapeJavaScript(true); tag.setPageContext(pageContext); tag.setValue("%{formatTitle()}"); @@ -241,7 +241,7 @@ public class PropertyTagTest extends StrutsInternalTestCase { // test {PropertyTag tag = new PropertyTag(); - tag.setEscape(false); + tag.setEscapeHtml(false); tag.setEscapeXml(true); tag.setPageContext(pageContext); tag.setValue("%{formatTitle()}"); @@ -271,7 +271,7 @@ public class PropertyTagTest extends StrutsInternalTestCase { // test {PropertyTag tag = new PropertyTag(); - tag.setEscape(false); + tag.setEscapeHtml(false); tag.setEscapeCsv(true); tag.setPageContext(pageContext); tag.setValue("%{formatTitle()}");