Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExternalContext.dispatch Javadocs Should Match Implementation #1136

Closed
eclipse-faces-bot opened this issue Oct 12, 2012 · 9 comments
Closed

Comments

@eclipse-faces-bot
Copy link

Currently the Javadocs for ExternalContext.dispatch method say:

@throws IllegalArgumentException if no request dispatcher

  • can be created for the specified path
    @throws NullPointerException if path
  • is null

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 getRequestDisatcher(path) returns null, send aServletResponse SC_NOT_FOUND error code.

Affected Versions

[2.2]

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
Reported by rogerk

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
Was assigned to rogerk

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
rogerk said:
Changes.

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
File: changebundle-sp-1136.txt
Attached By: rogerk

@eclipse-faces-bot
Copy link
Author

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

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
Marked as fixed on Friday, October 12th 2012, 7:47:06 am

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@manfredriem said:
Closing resolved issue out

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
This issue was imported from java.net JIRA JAVASERVERFACES_SPEC_PUBLIC-1136

@eclipse-faces-bot
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants