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

PortAssigner javadoc should explain restriction on ServerFactory #445

Closed
sleberknight opened this issue Apr 22, 2024 · 0 comments · Fixed by #449
Closed

PortAssigner javadoc should explain restriction on ServerFactory #445

sleberknight opened this issue Apr 22, 2024 · 0 comments · Fixed by #449
Assignees
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@sleberknight
Copy link
Member

The class-level javadoc in PortAssigner should be amended to note that:

  • the ServerFactory must be provided
  • that ServerFactory must be an instance of DefaultServerFactory

We can also add the reason why the builder accepts a ServerFactory instead of DefaultServerFactory, which is that Dropwizard's Configuration#getServerFactory returns ServerFactory, so this allows passing that instance through to PortAssigner without a type check and cast. It is therefore a convenience, since the type check occurs during construction of PortAssigner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
1 participant