File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
core/src/test/java/com/opensymphony/xwork2/ognl/accessor Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -83,4 +83,23 @@ public void testAutoGrowthCollectionLimit() {
83
83
assertEquals (3 , vs .findValue ("strings.size()" ));
84
84
}
85
85
86
+ public void testDeprecatedAutoGrowCollectionLimit () {
87
+ PropertyAccessor accessor = container .getInstance (PropertyAccessor .class , ArrayList .class .getName ());
88
+ ((XWorkListPropertyAccessor ) accessor ).setDeprecatedAutoGrowCollectionLimit ("2" );
89
+
90
+ List <String > myList = new ArrayList <>();
91
+ ListHolder listHolder = new ListHolder ();
92
+ listHolder .setStrings (myList );
93
+
94
+ ValueStack vs = ActionContext .getContext ().getValueStack ();
95
+ vs .push (listHolder );
96
+
97
+ vs .setValue ("strings[0]" , "a" );
98
+ vs .setValue ("strings[1]" , "b" );
99
+ vs .setValue ("strings[2]" , "c" );
100
+ vs .setValue ("strings[3]" , "d" );
101
+
102
+ assertEquals (3 , vs .findValue ("strings.size()" ));
103
+ }
104
+
86
105
}
You can’t perform that action at this time.
0 commit comments