This is an automated email from the ASF dual-hosted git repository.
crazyhzm pushed a commit to branch 3.3
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.3 by this push:
new e60f24cb7f Fix potential npe of CodecUtils (#13695)
e60f24cb7f is described below
commit e60f24cb7fc0ec551ccb590b10b6ab3fe74d472d
Author: namelessssssssssss
<[email protected]>
AuthorDate: Tue Jan 30 15:06:13 2024 +0800
Fix potential npe of CodecUtils (#13695)
---
.../dubbo/remoting/http12/netty4/h1/NettyHttp1ConnectionHandler.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/dubbo-remoting/dubbo-remoting-http12/src/main/java/org/apache/dubbo/remoting/http12/netty4/h1/NettyHttp1ConnectionHandler.java
b/dubbo-remoting/dubbo-remoting-http12/src/main/java/org/apache/dubbo/remoting/http12/netty4/h1/NettyHttp1ConnectionHandler.java
index c43fa7cab6..6df2d6ec60 100644
---
a/dubbo-remoting/dubbo-remoting-http12/src/main/java/org/apache/dubbo/remoting/http12/netty4/h1/NettyHttp1ConnectionHandler.java
+++
b/dubbo-remoting/dubbo-remoting-http12/src/main/java/org/apache/dubbo/remoting/http12/netty4/h1/NettyHttp1ConnectionHandler.java
@@ -56,7 +56,7 @@ public class NettyHttp1ConnectionHandler extends
SimpleChannelInboundHandler<Htt
.getExtensionLoader(ThreadPool.class)
.getAdaptiveExtension()
.getExecutor(url);
- this.codecUtils =
frameworkModel.getBeanFactory().getBean(CodecUtils.class);
+ this.codecUtils =
frameworkModel.getBeanFactory().getOrRegisterBean(CodecUtils.class);
}
public NettyHttp1ConnectionHandler(
@@ -69,7 +69,7 @@ public class NettyHttp1ConnectionHandler extends
SimpleChannelInboundHandler<Htt
.getExtensionLoader(ThreadPool.class)
.getAdaptiveExtension()
.getExecutor(url);
- this.codecUtils =
frameworkModel.getBeanFactory().getBean(CodecUtils.class);
+ this.codecUtils =
frameworkModel.getBeanFactory().getOrRegisterBean(CodecUtils.class);
this.http1ServerTransportListenerFactory =
http1ServerTransportListenerFactory;
}