Uploaded image for project: 'XWork'
  1. XWork
  2. XW-569

a few minor issues with interceptors

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • Future
    • 2.1
    • Interceptors
    • None
    • Patch

    Description

      There are a few minor issues I noticed while perusing the interceptor code. First, in ExceptionMappingInterceptor, there is a getter for the variable logEnabled, but it is not called and the variable is accessed directly. My patch includes a call to the getter method, although, it may be possible to remove the method altogether.

      Second, in LoggingInterceptor, it appears that the messages logged are in reverse order. On this one, maybe I read the logic wrong, but it seems that the order should be "starting invocation," invocation, then "finishing invocation.

      Last, in ModelDrivenInterceptor, the getModel method is called twice on the action. This would only be trouble if a user were to do some work in the getter to generate their model. So, rather than call getModel() twice, I store the result and make the call once.

      I can't get the build to succeed on trunk, so I didn't run unit tests, etc. so I can't guarantee that the changes even compile. But, the changes are trivial, so I would imagine that the idea should be fairly obvious from the patch.

      Attachments

        Activity

          People

            mrdon Donald J. Brown
            wesw Wesley Wannemacher
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: