Skip to content

Commit

Permalink
Fix triple injvm deep copy issue (#13597)
Browse files Browse the repository at this point in the history
  • Loading branch information
namelessssssssssss authored Jan 4, 2024
1 parent 1bdbfd8 commit e583187
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.apache.dubbo.common.serialize.ObjectInput;
import org.apache.dubbo.common.serialize.ObjectOutput;
import org.apache.dubbo.common.serialize.Serialization;
import org.apache.dubbo.common.utils.ProtobufUtils;
import org.apache.dubbo.remoting.utils.UrlUtils;

import java.io.ByteArrayInputStream;
Expand All @@ -40,6 +41,10 @@ public class DefaultParamDeepCopyUtil implements ParamDeepCopyUtil {
@Override
@SuppressWarnings({"unchecked"})
public <T> T copy(URL url, Object src, Class<T> targetClass, Type type) {
// TODO: maybe we have better way to do this
if (src != null && ProtobufUtils.isProtobufClass(src.getClass())) {
return (T) src;
}
Serialization serialization = url.getOrDefaultFrameworkModel()
.getExtensionLoader(Serialization.class)
.getExtension(UrlUtils.serializationOrDefault(url));
Expand Down

0 comments on commit e583187

Please sign in to comment.