@@ -129,8 +129,8 @@ private NettyHttpService(String serviceName,
129129 this .workerThreadPoolSize = workerThreadPoolSize ;
130130 this .execThreadPoolSize = execThreadPoolSize ;
131131 this .execThreadKeepAliveSecs = execThreadKeepAliveSecs ;
132- this .channelConfigs = new HashMap <>(channelConfigs );
133- this .childChannelConfigs = new HashMap <>(childChannelConfigs );
132+ this .channelConfigs = new HashMap <ChannelOption , Object >(channelConfigs );
133+ this .childChannelConfigs = new HashMap <ChannelOption , Object >(childChannelConfigs );
134134 this .rejectedExecutionHandler = rejectedExecutionHandler ;
135135 this .resourceHandler = new HttpResourceHandler (httpHandlers , handlerHooks , urlRewriter , exceptionHandler );
136136 this .handlerContext = new BasicHandlerContext (this .resourceHandler );
@@ -193,10 +193,9 @@ public synchronized void start() throws Exception {
193193 shutdownExecutorGroups (0 , 5 , TimeUnit .SECONDS , eventExecutorGroup );
194194 }
195195 } catch (Throwable t2 ) {
196- t .addSuppressed (t2 );
197196 }
198197 state = State .FAILED ;
199- throw t ;
198+ throw ( Exception ) t ;
200199 }
201200 }
202201
@@ -255,7 +254,7 @@ public synchronized void stop(long quietPeriod, long timeout, TimeUnit unit) thr
255254 }
256255 } catch (Throwable t ) {
257256 state = State .FAILED ;
258- throw t ;
257+ throw ( Exception ) t ;
259258 }
260259 state = State .STOPPED ;
261260 LOG .debug ("Stopped HTTP Service {} on address {}" , serviceName , bindAddress );
@@ -370,7 +369,7 @@ protected void initChannel(SocketChannel ch) throws Exception {
370369 */
371370 private void shutdownExecutorGroups (long quietPeriod , long timeout , TimeUnit unit , EventExecutorGroup ...groups ) {
372371 Exception ex = null ;
373- List <Future <?>> futures = new ArrayList <>();
372+ List <Future <?>> futures = new ArrayList <Future <?> >();
374373 for (EventExecutorGroup group : groups ) {
375374 if (group == null ) {
376375 continue ;
@@ -385,7 +384,6 @@ private void shutdownExecutorGroups(long quietPeriod, long timeout, TimeUnit uni
385384 if (ex == null ) {
386385 ex = e ;
387386 } else {
388- ex .addSuppressed (e );
389387 }
390388 }
391389 }
@@ -442,8 +440,8 @@ protected Builder(String serviceName) {
442440 rejectedExecutionHandler = DEFAULT_REJECTED_EXECUTION_HANDLER ;
443441 httpChunkLimit = DEFAULT_HTTP_CHUNK_LIMIT ;
444442 port = 0 ;
445- channelConfigs = new HashMap <>();
446- childChannelConfigs = new HashMap <>();
443+ channelConfigs = new HashMap <ChannelOption , Object >();
444+ childChannelConfigs = new HashMap <ChannelOption , Object >();
447445 channelConfigs .put (ChannelOption .SO_BACKLOG , DEFAULT_CONNECTION_BACKLOG );
448446 sslHandlerFactory = null ;
449447 exceptionHandler = new ExceptionHandler ();
0 commit comments