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

[MJAVADOC-687] Upgrade Jetty Version to last 9.4.x #92

Merged
merged 12 commits into from Aug 6, 2021
5 changes: 5 additions & 0 deletions pom.xml
Expand Up @@ -381,6 +381,11 @@ under the License.
<version>3.19.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.5</version>
olamy marked this conversation as resolved.
Show resolved Hide resolved
</dependency>
</dependencies>

<build>
Expand Down
31 changes: 1 addition & 30 deletions src/test/java/org/apache/maven/plugins/javadoc/ProxyServer.java
Expand Up @@ -64,9 +64,7 @@ public ProxyServer( AuthAsyncProxyServlet proxyServlet )
*/
public ProxyServer( String hostName, int port, AuthAsyncProxyServlet proxyServlet )
{
proxyServer = new Server();

proxyServer.addConnector(getDefaultConnector( hostName, port, proxyServer ));
proxyServer = new Server( 0 );

// Setup proxy handler to handle CONNECT methods
ConnectHandler proxy = new ConnectHandler();
Expand Down Expand Up @@ -122,32 +120,6 @@ public void stop()
proxyServer = null;
}

private ServerConnector getDefaultConnector( String hostName, int port, Server server )
{
ServerConnector connector = new ServerConnector( server );
connector.setReuseAddress( true );
if ( hostName != null )
{
connector.setHost( hostName );
}
else
{
try
{
connector.setHost( InetAddress.getLocalHost().getCanonicalHostName() );
}
catch ( UnknownHostException e )
{
// nop
}
}
if ( port > 0 )
{
connector.setPort( port );
}

return connector;
}

/**
* A proxy servlet with authentication support.
Expand Down Expand Up @@ -188,7 +160,6 @@ public AuthAsyncProxyServlet( Map<String, String> authentications )
public AuthAsyncProxyServlet( Map<String, String> authentications, long sleepTime )
{
this();

this.authentications = authentications;
this.sleepTime = sleepTime;
}
Expand Down