-
Notifications
You must be signed in to change notification settings - Fork 26.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
org.apache.dubbo.metadata.definition.builder.MapTypeBuilder#build写死actualTypeArgsLength==2?? #9847
Comments
单目或3目的就有问题,如下 ` ` |
硬要改为2目的就没问题 ` |
翻了以前的一些issue 比如 #8212 和 #5122 都提到过这个问题,我认为这段强校验的代码没必要存在。
虽然可以通过SPI来扩展,但是还是给用户带来了一定的困扰。 |
第一次遇见阿里产品里面响应这么快的,给你666个赞,thanks! |
Environment
Steps to reproduce this issue
public class ResponseEntity extends LinkedHashMap<String,Object> implements Serializable {...}
@OverRide
public ResponseEntity sayHello(String a) {
return ResponseEntity.fromResult(0,a);
}
那么启动时会报错,org.apache.dubbo.metadata.definition.builder.MapTypeBuilder#build,if (actualTypeArgsLength != 2) {。。。}
不明白为什么要写死
2.如果我将ResponseEntity改为2目:
public class ResponseEntity<T,Object> extends LinkedHashMap<String,Object> implements Serializable {...}
@OverRide
public ResponseEntity<String,Object> sayHello(String a) {
return ResponseEntity.fromResult(0,a);
}
...这样就可以,这算是一个bug么? 我看21年的时候有人提出过,但新版本也没改善。
Expected Behavior
Actual Behavior
If there is an exception, please attach the exception trace:
The text was updated successfully, but these errors were encountered: