Skip to content

Commit 556522e

Browse files
authored
WW-5529 Drops unused misleading setter setMaxLength in favour of setMaxlength (#1221)
1 parent 1db8a72 commit 556522e

File tree

1 file changed

+10
-17
lines changed

1 file changed

+10
-17
lines changed

core/src/main/java/org/apache/struts2/components/TextField.java

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,12 @@
1818
*/
1919
package org.apache.struts2.components;
2020

21+
import jakarta.servlet.http.HttpServletRequest;
22+
import jakarta.servlet.http.HttpServletResponse;
2123
import org.apache.struts2.util.ValueStack;
2224
import org.apache.struts2.views.annotations.StrutsTag;
2325
import org.apache.struts2.views.annotations.StrutsTagAttribute;
2426

25-
import jakarta.servlet.http.HttpServletRequest;
26-
import jakarta.servlet.http.HttpServletResponse;
27-
2827
/**
2928
* <!-- START SNIPPET: javadoc -->
3029
* <p>Render an HTML input field of type text</p>
@@ -50,17 +49,16 @@
5049
* </pre>
5150
*/
5251
@StrutsTag(
53-
name="textfield",
54-
tldTagClass="org.apache.struts2.views.jsp.ui.TextFieldTag",
55-
description="Render an HTML input field of type text",
56-
allowDynamicAttributes=true)
52+
name = "textfield",
53+
tldTagClass = "org.apache.struts2.views.jsp.ui.TextFieldTag",
54+
description = "Render an HTML input field of type text",
55+
allowDynamicAttributes = true)
5756
public class TextField extends UIBean {
5857
/**
5958
* The name of the default template for the TextFieldTag
6059
*/
6160
final public static String TEMPLATE = "text";
6261

63-
6462
protected String maxlength;
6563
protected String readonly;
6664
protected String size;
@@ -95,27 +93,22 @@ protected void evaluateExtraParams() {
9593

9694
}
9795

98-
@StrutsTagAttribute(description="HTML maxlength attribute", type="Integer")
96+
@StrutsTagAttribute(description = "HTML maxlength attribute", type = "Integer")
9997
public void setMaxlength(String maxlength) {
10098
this.maxlength = maxlength;
10199
}
102100

103-
@StrutsTagAttribute(description="Deprecated. Use maxlength instead.", type="Integer")
104-
public void setMaxLength(String maxlength) {
105-
this.maxlength = maxlength;
106-
}
107-
108-
@StrutsTagAttribute(description="Whether the input is readonly", type="Boolean", defaultValue="false")
101+
@StrutsTagAttribute(description = "Whether the input is readonly", type = "Boolean", defaultValue = "false")
109102
public void setReadonly(String readonly) {
110103
this.readonly = readonly;
111104
}
112105

113-
@StrutsTagAttribute(description="HTML size attribute", type="Integer")
106+
@StrutsTagAttribute(description = "HTML size attribute", type = "Integer")
114107
public void setSize(String size) {
115108
this.size = size;
116109
}
117110

118-
@StrutsTagAttribute(description="Specifies the html5 type element to display. e.g. text, email, url", defaultValue="text")
111+
@StrutsTagAttribute(description = "Specifies the html5 type element to display. e.g. text, email, url", defaultValue = "text")
119112
public void setType(String type) {
120113
this.type = type;
121114
}

0 commit comments

Comments
 (0)