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

Should call getNativeResponse() instead of getNativeRequest() in FrameworkServlet

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 4.3.10, 5.0 RC3
    • Fix Version/s: 4.3.11, 5.0 RC4
    • Component/s: Web
    • Labels:
      None
    • Last commented by a User:
      false

      Description

      While reading the code of FrameworkServlet#RequestBindingInterceptor, I noticed that we try to obtain the HttpServletResponse using webRequest.getNativeRequest(HttpServletResponse.class) instead of webRequest.getNativeResponse(HttpServletResponse.class) :

      https://github.com/spring-projects/spring-framework/blob/v5.0.0.RC3/spring-webmvc/src/main/java/org/springframework/web/servlet/FrameworkServlet.java#L1142

      I'm wondering if it's a typo, and if it should be fixed?

      I'm not sure about the impact, but it seems to have been added in this commit, so I guess it is not a huge issue, since the code is here since 2013... But I thought I might as well create a ticket, just in case.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                juergen.hoeller Juergen Hoeller
                Reporter:
                eneveu Etienne Neveu
                Last updater:
                St├ęphane Nicoll
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  44 weeks, 3 days ago