Skip to content

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

Closed
@ah1508

Description

@ah1508

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

Returns: Mono to indicate when writing is complete

Activity

added this to the 5.2 M3 milestone on Jun 3, 2019
changed the title [-]Error in javadoc for o.s.wb.servlet.function.ServerResponse[/-] [+]Error in javadoc for o.s.web.servlet.function.ServerResponse[/+] on Jun 3, 2019
self-assigned this
on Jun 3, 2019
sbrannen

sbrannen commented on Jun 3, 2019

@sbrannen
Member

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?

added
in: webIssues in web modules (web, webmvc, webflux, websocket)
on Jun 3, 2019
removed their assignment
on Jun 3, 2019
self-assigned this
on Jun 3, 2019
added a commit that references this issue on Jun 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: documentationA documentation task

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @sbrannen@poutsma@spring-projects-issues@ah1508

      Issue actions

        Error in javadoc for o.s.web.servlet.function.ServerResponse · Issue #23075 · spring-projects/spring-framework