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

Aspects are not executed when chaining AOPed actions

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5.12
    • Component/s: Core
    • Labels:
      None

      Description

      This is a bug in resolution of WW-4105. When we pass the unwrapped object of the proxied action to the `reflectionProvider.copy`, actually we miss aspects executions which are implemented inside the proxied object rather than the unwrapped one.

        Issue Links

          Activity

          Hide
          yasser.zamani Yasser Zamani added a comment - - edited

          I'm working on this. The resolution is simple and I have similar implementation at WW-4105 OgnlUtil improved in order to only setting properties defined.

          Show
          yasser.zamani Yasser Zamani added a comment - - edited I'm working on this. The resolution is simple and I have similar implementation at WW-4105 OgnlUtil improved in order to only setting properties defined .
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user yasserzamani opened a pull request:

          https://github.com/apache/struts/pull/139

          WW-4800 Executes aspects when chaining AOPed actions

          These fix some bugs in my previous PR, #135 which passes the unwrapped object of the proxied action to the `reflectionProvider.copy`, then we miss aspects executions which are implemented inside the proxied object rather than the unwrapped one.

          Also fix some bugs in unit tests of my previous PR and improves them.

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/yasserzamani/struts WW-4800

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/struts/pull/139.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #139


          commit 8e9f9fb89ff84e3f383d0aef73443af919c271d7
          Author: Yasser Zamani <yasser.zamani@live.com>
          Date: 2017-05-29T14:26:10Z

          WW-4800 Executes aspects when chaining AOPed actions


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user yasserzamani opened a pull request: https://github.com/apache/struts/pull/139 WW-4800 Executes aspects when chaining AOPed actions These fix some bugs in my previous PR, #135 which passes the unwrapped object of the proxied action to the `reflectionProvider.copy`, then we miss aspects executions which are implemented inside the proxied object rather than the unwrapped one. Also fix some bugs in unit tests of my previous PR and improves them. You can merge this pull request into a Git repository by running: $ git pull https://github.com/yasserzamani/struts WW-4800 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/struts/pull/139.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #139 commit 8e9f9fb89ff84e3f383d0aef73443af919c271d7 Author: Yasser Zamani <yasser.zamani@live.com> Date: 2017-05-29T14:26:10Z WW-4800 Executes aspects when chaining AOPed actions
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 8e9f9fb89ff84e3f383d0aef73443af919c271d7 in struts's branch refs/heads/master from Yasser Zamani
          [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=8e9f9fb ]

          WW-4800 Executes aspects when chaining AOPed actions

          Show
          jira-bot ASF subversion and git services added a comment - Commit 8e9f9fb89ff84e3f383d0aef73443af919c271d7 in struts's branch refs/heads/master from Yasser Zamani [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=8e9f9fb ] WW-4800 Executes aspects when chaining AOPed actions
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/struts/pull/139

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/struts/pull/139
          Hide
          lukaszlenart Lukasz Lenart added a comment -

          PR got merged

          Show
          lukaszlenart Lukasz Lenart added a comment - PR got merged
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user lukaszlenart commented on the issue:

          https://github.com/apache/struts/pull/139

          Thanks, merged

          Show
          githubbot ASF GitHub Bot added a comment - Github user lukaszlenart commented on the issue: https://github.com/apache/struts/pull/139 Thanks, merged
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Jenkins build Struts-JDK7-master #634 (See https://builds.apache.org/job/Struts-JDK7-master/634/)
          WW-4800 Executes aspects when chaining AOPed actions (yasser.zamani: rev 8e9f9fb89ff84e3f383d0aef73443af919c271d7)

          • (edit) core/src/test/java/com/opensymphony/xwork2/ognl/OgnlUtilTest.java
          • (edit) core/src/test/java/com/opensymphony/xwork2/spring/SpringProxyUtilTest.java
          • (edit) core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java
          • (edit) core/src/main/java/com/opensymphony/xwork2/util/reflection/ReflectionProvider.java
          • (edit) core/src/main/java/com/opensymphony/xwork2/interceptor/ChainingInterceptor.java
          • (add) core/src/test/java/com/opensymphony/xwork2/spring/TestAspect.java
          • (edit) core/src/main/java/com/opensymphony/xwork2/ognl/OgnlReflectionProvider.java
          • (edit) core/src/test/resources/com/opensymphony/xwork2/spring/actionContext-spring.xml
          • (edit) core/src/test/java/com/opensymphony/xwork2/spring/ActionsFromSpringTest.java
          • (edit) core/src/main/java/com/opensymphony/xwork2/util/ProxyUtil.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Jenkins build Struts-JDK7-master #634 (See https://builds.apache.org/job/Struts-JDK7-master/634/ ) WW-4800 Executes aspects when chaining AOPed actions (yasser.zamani: rev 8e9f9fb89ff84e3f383d0aef73443af919c271d7) (edit) core/src/test/java/com/opensymphony/xwork2/ognl/OgnlUtilTest.java (edit) core/src/test/java/com/opensymphony/xwork2/spring/SpringProxyUtilTest.java (edit) core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java (edit) core/src/main/java/com/opensymphony/xwork2/util/reflection/ReflectionProvider.java (edit) core/src/main/java/com/opensymphony/xwork2/interceptor/ChainingInterceptor.java (add) core/src/test/java/com/opensymphony/xwork2/spring/TestAspect.java (edit) core/src/main/java/com/opensymphony/xwork2/ognl/OgnlReflectionProvider.java (edit) core/src/test/resources/com/opensymphony/xwork2/spring/actionContext-spring.xml (edit) core/src/test/java/com/opensymphony/xwork2/spring/ActionsFromSpringTest.java (edit) core/src/main/java/com/opensymphony/xwork2/util/ProxyUtil.java

            People

            • Assignee:
              lukaszlenart Lukasz Lenart
              Reporter:
              yasser.zamani Yasser Zamani
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development