- Dubbo version: 3.2.4
- Operating System version: x86_64 Linux
- Java version: openJDK 17
-
service result类,包含4个boolean属性,两个默认值为true
public class Foo implements Serializable { boolean success = true; boolean success1 = true; boolean success2; boolean success3; String message; // getter,setter ...
2. DubboService将4个boolean属性全部设置为false,并返回
@DubboService public class TestServiceImpl implements TestService { @Override public Foo foo() { Foo c = new Foo(); c.setSuccess(false); c.setSuccess1(false); c.setSuccess2(false); c.setSuccess3(false); c.setMessage("success"); return c; } }
3. bug: 返回结果,默认值为true的属性,接口返回值为true,而不是service设置的false
@DubboReference TestService testService;
@RequestMapping("/test")
public Foo test() {
return testService.foo();
}
// result {"success":true,"success1":true,"success2":false,"success3":false,"message":"success"}
Pls. provide [GitHub address] to reproduce this issue.
sample code:
https://github.com/liyesa/dubbo-bug
### Expected Behavior
<!-- What do you expect from the above steps?-->
boolean值能正确返回
### Actual Behavior
<!-- What actually happens? -->
有初始值=true的boolean属性,client拿到的永远是false;
补充:
在doubbo admin执行,返回结果正常
在telnet执行,返回结果正常
设置preferSerialization为 hessian2,返回结果正确
If there is an exception, please attach the exception trace:
NONE error log