Skip to content

Commit 0c3af16

Browse files
committed
判空优化
1 parent 91b783a commit 0c3af16

File tree

1 file changed

+1
-1
lines changed
  • EasyRest/src/main/java/tech/dbgsoftware/easyrest/network

1 file changed

+1
-1
lines changed

EasyRest/src/main/java/tech/dbgsoftware/easyrest/network/NettyInit.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ private void registerUserHandlers(ChannelPipeline pipeline){
243243
userHandlers.forEach((name, handler) -> {
244244
Function<Map<String, Boolean>, ChannelHandler> handlerPredicate = newHandler -> {
245245
try {
246-
if (newHandler != null && handler != null && !newHandler.get(name)) {
246+
if (newHandler != null && handler != null && newHandler.containsKey(name) && !newHandler.get(name)) {
247247
return handler.getClass().newInstance();
248248
}
249249
} catch (InstantiationException | IllegalAccessException e) {

0 commit comments

Comments
 (0)