Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4707

Multiselect parameter behavior different between struts 2.5.5 and 2.5.1

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5.5
    • Fix Version/s: 2.5.8
    • Component/s: None
    • Labels:
      None

      Description

      Note: not 100% sure this is a bug, but it's a definite change in behavior:

      The implementation of Parameter.Request changes behaviors such that "clearing" a multiselect parameter __multiselect_includedStatuses= sets includedStatuses = null while the older behavior did something different (probably called "clear()."

        Issue Links

          Activity

          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build Struts-JDK7-master #546 (See https://builds.apache.org/job/Struts-JDK7-master/546/)
          WW-4702 WW-4707 Fixes issue with with list based parameters (lukaszlenart: rev b5240560ab5e63e66d5108d15fc78a6622019547)

          • (edit) core/src/main/java/com/opensymphony/xwork2/config/providers/XWorkConfigurationProvider.java
          • (edit) core/src/main/resources/struts-default.xml
          • (edit) core/src/test/java/com/opensymphony/xwork2/interceptor/ParametersInterceptorTest.java
          • (edit) core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java
          • (add) core/src/main/java/com/opensymphony/xwork2/ognl/accessor/HttpParametersPropertyAccessor.java
          • (add) core/src/main/java/com/opensymphony/xwork2/ognl/accessor/ParameterPropertyAccessor.java
          • (edit) core/src/test/java/com/opensymphony/xwork2/SimpleAction.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Struts-JDK7-master #546 (See https://builds.apache.org/job/Struts-JDK7-master/546/ ) WW-4702 WW-4707 Fixes issue with with list based parameters (lukaszlenart: rev b5240560ab5e63e66d5108d15fc78a6622019547) (edit) core/src/main/java/com/opensymphony/xwork2/config/providers/XWorkConfigurationProvider.java (edit) core/src/main/resources/struts-default.xml (edit) core/src/test/java/com/opensymphony/xwork2/interceptor/ParametersInterceptorTest.java (edit) core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java (add) core/src/main/java/com/opensymphony/xwork2/ognl/accessor/HttpParametersPropertyAccessor.java (add) core/src/main/java/com/opensymphony/xwork2/ognl/accessor/ParameterPropertyAccessor.java (edit) core/src/test/java/com/opensymphony/xwork2/SimpleAction.java
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit b5240560ab5e63e66d5108d15fc78a6622019547 in struts's branch refs/heads/master from Lukasz Lenart
          [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=b524056 ]

          WW-4702 WW-4707 Fixes issue with with list based parameters

          Show
          jira-bot ASF subversion and git services added a comment - Commit b5240560ab5e63e66d5108d15fc78a6622019547 in struts's branch refs/heads/master from Lukasz Lenart [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=b524056 ] WW-4702 WW-4707 Fixes issue with with list based parameters
          Hide
          abrin adam brin added a comment - - edited

          In our system, includedStatuses is initialized as an empty ArrayList e.g.:

          private List<Status> includedStatues = new ArrayList<>();

          URL: http://localhost:8080/search/results?&groups%5B0%5D.fieldTypes%5B1%5D=DATE_CREATED&groups%5B0%5D.createdDates%5B1%5D.start=2001&groups%5B0%5D.createdDates%5B1%5D.end=2009&__multiselect_includedStatuses=

          v.2.5.1 - Struts processes the url parameters and includedStatuses is still an empty ArrayList<>(); (so either it was set to be an empty array list, or .clear() was called on the List).
          v.2.5.5 - Struts processes the url parameters and includedStatuses is NULL.

          Show
          abrin adam brin added a comment - - edited In our system, includedStatuses is initialized as an empty ArrayList e.g.: private List<Status> includedStatues = new ArrayList<>(); URL: http://localhost:8080/search/results?&groups%5B0%5D.fieldTypes%5B1%5D=DATE_CREATED&groups%5B0%5D.createdDates%5B1%5D.start=2001&groups%5B0%5D.createdDates%5B1%5D.end=2009&__multiselect_includedStatuses= v.2.5.1 - Struts processes the url parameters and includedStatuses is still an empty ArrayList<>(); (so either it was set to be an empty array list, or .clear() was called on the List). v.2.5.5 - Struts processes the url parameters and includedStatuses is NULL.
          Hide
          aleksandr-m Aleksandr Mashchenko added a comment -

          What do you mean by "clearing"? Steps to reproduce?

          Show
          aleksandr-m Aleksandr Mashchenko added a comment - What do you mean by "clearing"? Steps to reproduce?

            People

            • Assignee:
              lukaszlenart Lukasz Lenart
              Reporter:
              abrin adam brin
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development