Fix triple injvm deep copy issue (#13597)
This commit is contained in:
parent
1bdbfd8647
commit
e583187aac
|
|
@ -22,6 +22,7 @@ import org.apache.dubbo.common.logger.LoggerFactory;
|
|||
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;
|
||||
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in New Issue