Details

      Description

      Currently the Javadocs for ExternalContext.dispatch method say:

      @throws IllegalArgumentException if no request dispatcher

      • can be created for the specified path
        @throws NullPointerException if <code>path</code>
      • is <code>null</code>

      However the implementation does this:

      RequestDispatcher requestDispatcher = request.getRequestDispatcher(
      requestURI);
      if (requestDispatcher == null)

      { ((HttpServletResponse) response). sendError(HttpServletResponse.SC_NOT_FOUND); return; }

      The servlet specification indicates that a null RequestDispatcher will be returned if one cannot be created (for example by passing in a null argument to request.getRequestDispatcher). The JavaDocs for ExternalContextDispatcher should be changed as follows:

      1. remove throws IllegalArgumentException, NullpointerException verbage.
      2. add "If the call to <code>getRequestDisatcher(path)</code> returns null, send a<code>ServletResponse SC_NOT_FOUND</code> error code.

        Activity

        Hide
        rogerk added a comment -

        Changes.

        Show
        rogerk added a comment - Changes.
        Hide
        rogerk added a comment -

        Committed to trunk:
        Sending jsf-api/src/main/java/javax/faces/context/ExternalContext.java
        Transmitting file data .
        Committed revision 10834.

        Show
        rogerk added a comment - Committed to trunk: Sending jsf-api/src/main/java/javax/faces/context/ExternalContext.java Transmitting file data . Committed revision 10834.
        Hide
        Manfred Riem added a comment -

        Closing resolved issue out

        Show
        Manfred Riem added a comment - Closing resolved issue out

          People

          • Assignee:
            rogerk
            Reporter:
            rogerk
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: