Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-15525

HandlerExecutionChain toString() may miss interceptors

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 4.3.8, 5.0 M5
    • Fix Version/s: 4.3.9, 5.0 RC1
    • Component/s: Web
    • Labels:

      Description

      1. HandlerExecutionChain has attribute: interceptors and interceptorList, and can be classed into three state : state-i, state-ii, state-iii .
      2. calling getInterceptors, addInterceptor, or addInterceptors , can change state.
      3. construct a HandlerExecutionChain using a handler which is not instanceof HandlerExecutionChain, will be state-i;
      4. construct a HandlerExecutionChain using a handler which is instanceof HandlerExecutionChain, will be state-ii;
      5. calling toString in state-i will get the wrong number of interceptors. for example:
      LocaleChangeInterceptor local = new LocaleChangeInterceptor();
      HandlerExecutionChain chain = new HandlerExecutionChain(new Object(), local);
      System.out.println(chain);
      "chain" has one interceptor "local", but the toString() missed it.

        Attachments

          Activity

            People

            Assignee:
            juergen.hoeller Juergen Hoeller
            Reporter:
            QBNemo QBNemo
            Last updater:
            Spring Issues Spring Issues
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              3 years, 29 weeks, 6 days ago