sepe81 commented on code in PR #735:
URL: https://github.com/apache/struts/pull/735#discussion_r1300954436


##########
core/src/main/resources/struts-beans.xml:
##########
@@ -198,7 +198,7 @@
     <bean type="ognl.MethodAccessor" 
name="com.opensymphony.xwork2.util.CompoundRoot"
           class="com.opensymphony.xwork2.ognl.accessor.CompoundRootAccessor"/>
 
-    <bean class="org.apache.struts2.views.jsp.ui.OgnlTool"/>
+    <bean class="org.apache.struts2.views.jsp.ui.OgnlTool"/> <!-- Deprecated 
since 6.3.0 -->

Review Comment:
   Maybe it's better to put the comment before the bean?



##########
core/src/test/java/org/apache/struts2/util/StrutsUtilTest.java:
##########
@@ -145,28 +147,51 @@ public void testGetContextMethod() {
     }
 
 
-    public void testMakeSelectListMethod() {
-        String[] selectedList = new String[] { "Car", "Airplane", "Bus" };
-        List list = new ArrayList();
-        list.add("Lorry");
-        list.add("Car");
-        list.add("Helicopter");
+    public void testMakeSelectList() {
+        String[] selectedList = new String[]{"Car", "Airplane", "Bus"};
+        List<String> list = Arrays.asList("Lorry", "Car", "Helicopter");
+
+        stack.getContext().put("mySelectedList", selectedList);
+        stack.getContext().put("myList", list);
+
+        List<ListEntry> listMade = 
strutsUtil.makeSelectList("#mySelectedList", "#myList", null, null);
+
+        assertEquals(listMade.size(), 3);

Review Comment:
   for assertEquals, the expected value should be the first argument



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to