diff --git a/remoting/remoting-triple/src/main/java/com/alipay/sofa/rpc/utils/SofaProtoUtils.java b/remoting/remoting-triple/src/main/java/com/alipay/sofa/rpc/utils/SofaProtoUtils.java index 9faa90077..fee66c183 100644 --- a/remoting/remoting-triple/src/main/java/com/alipay/sofa/rpc/utils/SofaProtoUtils.java +++ b/remoting/remoting-triple/src/main/java/com/alipay/sofa/rpc/utils/SofaProtoUtils.java @@ -100,7 +100,9 @@ public static Map cacheStreamCallType(Class proxyClass) { for (Method method : declaredMethods) { String streamType = mapStreamType(method); if (StringUtils.isNotBlank(streamType)) { - methodCallType.put(method.getName(), streamType); + if (methodCallType.putIfAbsent(method.getName(), streamType) != null) { + throw new SofaRpcException(RpcErrorType.UNKNOWN, "triple pojo stream do not support method overload!!!"); + } } } return methodCallType;