@@ -126,7 +126,7 @@ public class Jetty extends io.jooby.Server.Base {
126126 .ifPresent (extension -> connectionFactories .addAll (extension .configure (httpConf )));
127127
128128 ServerConnector http = new ServerConnector (server ,
129- connectionFactories .toArray (new ConnectionFactory [connectionFactories . size () ]));
129+ connectionFactories .toArray (new ConnectionFactory [0 ]));
130130 http .setPort (options .getPort ());
131131 http .setHost (options .getHost ());
132132
@@ -138,7 +138,7 @@ public class Jetty extends io.jooby.Server.Base {
138138 sslContextFactory
139139 .setSslContext (options .getSSLContext (application .getEnvironment ().getClassLoader (), provider ));
140140 List <String > protocol = options .getSsl ().getProtocol ();
141- sslContextFactory .setIncludeProtocols (protocol .toArray (new String [protocol . size () ]));
141+ sslContextFactory .setIncludeProtocols (protocol .toArray (new String [0 ]));
142142 // exclude
143143 isNotInUse (protocol , "TLSv1" , sslContextFactory ::addExcludeProtocols );
144144 isNotInUse (protocol , "TLSv1.1" , sslContextFactory ::addExcludeProtocols );
@@ -166,7 +166,7 @@ public class Jetty extends io.jooby.Server.Base {
166166
167167 ServerConnector secureConnector = new ServerConnector (server ,
168168 secureConnectionFactories
169- .toArray (new ConnectionFactory [secureConnectionFactories . size () ]));
169+ .toArray (new ConnectionFactory [0 ]));
170170 secureConnector .setPort (options .getSecurePort ());
171171 secureConnector .setHost (options .getHost ());
172172
0 commit comments