jetty / jetty.website

Antora-based jetty.org website.
https://jetty.org
Eclipse Public License 2.0
0 stars 2 forks source link

Example shows ContextHandlerCollection example that won't compile in 12.0.9 #29

Closed garydgregory closed 1 month ago

garydgregory commented 2 months ago

Hello,

The page https://eclipse.dev/jetty/documentation/jetty-12/programming-guide/index.html#pg-server-http-handler

shows the code fragment:

// Create a ContextHandlerCollection to hold contexts.
ContextHandlerCollection contextCollection = new ContextHandlerCollection();

But the class org.eclipse.jetty.server.handler.ContextHandlerCollection does not have a 0-arg constructor in 12.0.9.

jmcc0nn3ll commented 2 months ago

I take this one, but we are in the process of a major conversion to Antora on the mainline Jetty branches, so I'll make sure this is addressed after that lands.

sbordet commented 1 month ago

But the class org.eclipse.jetty.server.handler.ContextHandlerCollection does not have a 0-arg constructor in 12.0.9.

ContextHandlerCollection(ContextHandler... contexts) should also work with no parameters.

@garydgregory are you sure?

garydgregory commented 1 month ago

@sbordet You're right! My IDE must have been complaining about somethings else. Sorry about that.