From e23197ab1b343e15f2bb1f4e21257db6cf83d3ba Mon Sep 17 00:00:00 2001 From: Lukasz Lenart Date: Mon, 15 Jan 2018 17:32:24 +0100 Subject: [PATCH] Uses the new constant and makes an old one deprecated --- .../ognl/accessor/XWorkListPropertyAccessor.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkListPropertyAccessor.java b/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkListPropertyAccessor.java index cb406b79b..242d09772 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkListPropertyAccessor.java +++ b/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkListPropertyAccessor.java @@ -28,6 +28,7 @@ import com.opensymphony.xwork2.util.reflection.ReflectionContextState; import ognl.ListPropertyAccessor; import ognl.OgnlException; import ognl.PropertyAccessor; +import org.apache.struts2.StrutsConstants; import java.util.Collection; import java.util.List; @@ -49,12 +50,18 @@ public class XWorkListPropertyAccessor extends ListPropertyAccessor { private ObjectTypeDeterminer objectTypeDeterminer; private OgnlUtil ognlUtil; private int autoGrowCollectionLimit = 255; - + + @Deprecated() @Inject(value = "xwork.autoGrowCollectionLimit", required = false) - public void setAutoGrowCollectionLimit(String value) { - this.autoGrowCollectionLimit = Integer.valueOf(value); - } + public void setDeprecatedAutoGrowCollectionLimit(String value) { + this.autoGrowCollectionLimit = Integer.valueOf(value); + } + @Inject(value = StrutsConstants.STRUTS_OGNL_AUTO_GROWTH_COLLECTION_LIMIT, required = false) + public void setAutoGrowCollectionLimit(String value) { + this.autoGrowCollectionLimit = Integer.parseInt(value); + } + @Inject("java.util.Collection") public void setXWorkCollectionPropertyAccessor(PropertyAccessor acc) { this._sAcc = (XWorkCollectionPropertyAccessor) acc;