@@ -129,8 +129,8 @@ private NettyHttpService(String serviceName,
129
129
this .workerThreadPoolSize = workerThreadPoolSize ;
130
130
this .execThreadPoolSize = execThreadPoolSize ;
131
131
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 );
134
134
this .rejectedExecutionHandler = rejectedExecutionHandler ;
135
135
this .resourceHandler = new HttpResourceHandler (httpHandlers , handlerHooks , urlRewriter , exceptionHandler );
136
136
this .handlerContext = new BasicHandlerContext (this .resourceHandler );
@@ -193,10 +193,9 @@ public synchronized void start() throws Exception {
193
193
shutdownExecutorGroups (0 , 5 , TimeUnit .SECONDS , eventExecutorGroup );
194
194
}
195
195
} catch (Throwable t2 ) {
196
- t .addSuppressed (t2 );
197
196
}
198
197
state = State .FAILED ;
199
- throw t ;
198
+ throw ( Exception ) t ;
200
199
}
201
200
}
202
201
@@ -255,7 +254,7 @@ public synchronized void stop(long quietPeriod, long timeout, TimeUnit unit) thr
255
254
}
256
255
} catch (Throwable t ) {
257
256
state = State .FAILED ;
258
- throw t ;
257
+ throw ( Exception ) t ;
259
258
}
260
259
state = State .STOPPED ;
261
260
LOG .debug ("Stopped HTTP Service {} on address {}" , serviceName , bindAddress );
@@ -370,7 +369,7 @@ protected void initChannel(SocketChannel ch) throws Exception {
370
369
*/
371
370
private void shutdownExecutorGroups (long quietPeriod , long timeout , TimeUnit unit , EventExecutorGroup ...groups ) {
372
371
Exception ex = null ;
373
- List <Future <?>> futures = new ArrayList <>();
372
+ List <Future <?>> futures = new ArrayList <Future <?> >();
374
373
for (EventExecutorGroup group : groups ) {
375
374
if (group == null ) {
376
375
continue ;
@@ -385,7 +384,6 @@ private void shutdownExecutorGroups(long quietPeriod, long timeout, TimeUnit uni
385
384
if (ex == null ) {
386
385
ex = e ;
387
386
} else {
388
- ex .addSuppressed (e );
389
387
}
390
388
}
391
389
}
@@ -442,8 +440,8 @@ protected Builder(String serviceName) {
442
440
rejectedExecutionHandler = DEFAULT_REJECTED_EXECUTION_HANDLER ;
443
441
httpChunkLimit = DEFAULT_HTTP_CHUNK_LIMIT ;
444
442
port = 0 ;
445
- channelConfigs = new HashMap <>();
446
- childChannelConfigs = new HashMap <>();
443
+ channelConfigs = new HashMap <ChannelOption , Object >();
444
+ childChannelConfigs = new HashMap <ChannelOption , Object >();
447
445
channelConfigs .put (ChannelOption .SO_BACKLOG , DEFAULT_CONNECTION_BACKLOG );
448
446
sslHandlerFactory = null ;
449
447
exceptionHandler = new ExceptionHandler ();
0 commit comments