Repository navigation
jetty, undertow: register ServerOptions on start, like netty - #4057
Merged
jknack merged 1 commit intoNov 27, 2026
Merged
Conversation
…oby-project#4056 A server started by hand, without runApp, never got ServerOptions in the app registry, so ctx.getServerPort() and friends failed with "Service not found: io.jooby.ServerOptions". NettyServer already registers the options and the server on start, Jetty and Undertow now do the same.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4057 +/- ##
============================================
- Coverage 94.21% 94.20% -0.01%
- Complexity 6694 6695 +1
============================================
Files 432 432
Lines 20966 20971 +5
Branches 2109 2109
============================================
+ Hits 19753 19756 +3
- Misses 761 762 +1
- Partials 452 453 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4056
JettyServerandUndertowServernow putServerOptionsand the server in each app registry on start, the same wayNettyServeralready does, so a server started withoutrunAppworks again. WithrunAppnothing changes,initalready puts the same instances there.Issue4056starts Jetty, Netty and Undertow by hand and callsctx.getServerPort(). Without the change it gets a 500 on Jetty and Undertow and passes on Netty. Thetests,jooby-jettyandjooby-undertowmodules pass locally on JDK 24 with an English locale.