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

Error in javadoc for o.s.web.servlet.function.ServerResponse #23075

Closed
ah1508 opened this issue Jun 3, 2019 · 1 comment
Closed

Error in javadoc for o.s.web.servlet.function.ServerResponse #23075

ah1508 opened this issue Jun 3, 2019 · 1 comment
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: documentation A documentation task
Milestone

Comments

@ah1508
Copy link

ah1508 commented Jun 3, 2019

Javadoc for writeTo method of org.springframework.web.servlet.function.ServerResponse is not correct:

Returns: Mono to indicate when writing is complete

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jun 3, 2019
@sbrannen sbrannen added type: documentation A documentation task and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jun 3, 2019
@sbrannen sbrannen added this to the 5.2 M3 milestone Jun 3, 2019
@sbrannen sbrannen changed the title Error in javadoc for o.s.wb.servlet.function.ServerResponse Error in javadoc for o.s.web.servlet.function.ServerResponse Jun 3, 2019
@sbrannen sbrannen self-assigned this Jun 3, 2019
@sbrannen
Copy link
Member

sbrannen commented Jun 3, 2019

Good catch.

The Javadoc should in fact look something more like the following, in order to align with org.springframework.web.reactive.function.server.ServerResponse.writeTo(ServerWebExchange, Context).

/**
 * Write this response to the given servlet response.
 * @param request the current request
 * @param response the response to write to
 * @param context the context to use when writing
 * @return a {@code ModelAndView} or {@code null}
 */
@Nullable
ModelAndView writeTo(HttpServletRequest request, HttpServletResponse response, Context context)
	throws ServletException, IOException;

@poutsma, can you elaborate on the intended semantics of the @return value, specifically when null is expected as a return value?

@sbrannen sbrannen added the in: web Issues in web modules (web, webmvc, webflux, websocket) label Jun 3, 2019
@sbrannen sbrannen removed their assignment Jun 3, 2019
@poutsma poutsma self-assigned this Jun 3, 2019
@poutsma poutsma closed this as completed in 1456101 Jun 4, 2019
sbrannen added a commit to sbrannen/spring-framework that referenced this issue Jun 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: documentation A documentation task
Projects
None yet
Development

No branches or pull requests

4 participants