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

TomcatReactiveWebServerFactory does not call getTomcatWebServer to create the TomcatWebServer #20386

Closed
wilkinsona opened this issue Mar 4, 2020 · 4 comments
Assignees
Labels
type: bug A general bug
Milestone

Comments

@wilkinsona
Copy link
Member

wilkinsona commented Mar 4, 2020

TomcatReactiveWebServerFactory.getWebServer(HttpHandler) doesn't delegate to TomcatReactiveWebServerFactory.getTomcatWebServer(Tomcat) and instead creates the TomcatWebServer instance directly. This makes the javadoc for getTomcatWebServer(Tomcat) misleading:

Factory method called to create the TomcatWebServer. Subclasses can override this method to return a different TomcatWebServer or apply additional processing to the Tomcat server.

@wilkinsona wilkinsona added the type: bug A general bug label Mar 4, 2020
@wilkinsona wilkinsona added this to the 2.1.x milestone Mar 4, 2020
@dongxiaofu
Copy link

@wilkinsona, I want to modify TomcatReactiveWebServerFactory.getWebServer(HttpHandler),

replacing return new TomcatWebServer(tomcat, getPort() >= 0); with return getTomcatWebServer(tomcat);.

If you agree with me,then may I work on the issue?

@wilkinsona
Copy link
Member Author

Thanks for the pull request, @gangganghong. The change you have proposed is exactly what I had in mind. I'll close this issue in favour of your PR.

@wilkinsona wilkinsona removed this from the 2.1.x milestone Mar 9, 2020
@wilkinsona wilkinsona added the status: superseded An issue that has been superseded by another label Mar 9, 2020
@dongxiaofu
Copy link

Thanks.

@wilkinsona wilkinsona removed the status: superseded An issue that has been superseded by another label Mar 11, 2020
@wilkinsona wilkinsona reopened this Mar 11, 2020
@wilkinsona wilkinsona added this to the 2.1.x milestone Mar 11, 2020
@wilkinsona wilkinsona self-assigned this Mar 11, 2020
@wilkinsona
Copy link
Member Author

Reopening as the pull request was closed.

@wilkinsona wilkinsona modified the milestones: 2.1.x, 2.1.14 Mar 11, 2020
wilkinsona added a commit that referenced this issue Mar 11, 2020
The fix was applied as part of 308e1d3. This commit merges forwards
the test that was added in 2.1.x and 2.2.x.

Fixes gh-20386 in 2.2.0.M3.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants