Skip to content

Commit

Permalink
Fix potential NPE (#13505)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbumenJ authored Dec 15, 2023
1 parent cf410d3 commit 1d1bb26
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.apache.dubbo.common.utils.StringUtils;
import org.apache.dubbo.rpc.model.FrameworkModel;

import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;

import com.alibaba.com.caucho.hessian.io.SerializerFactory;
Expand All @@ -46,7 +47,7 @@ public Hessian2FactoryManager(FrameworkModel frameworkModel) {

public SerializerFactory getSerializerFactory(ClassLoader classLoader) {
SerializerFactory sticky = stickySerializerFactory;
if (sticky != null && sticky.getClassLoader().equals(classLoader)) {
if (sticky != null && Objects.equals(sticky.getClassLoader(), classLoader)) {
return sticky;
}

Expand Down

0 comments on commit 1d1bb26

Please sign in to comment.