XiaoFeiASK commented on PR #3594:
URL: https://github.com/apache/dubbo-go/pull/3594#issuecomment-5189859524
## 新增修改
### `client/options_test.go`
问题: 缺少 `WithGeneric() -> WithGenericType("")` 的覆盖顺序测试。
修复: 新增测试,确认空 `generic` 会覆盖默认 `"true"`。
影响: 防止空 `generic` 被误当成 `"true"`。
### `filter/generic/service.go`
问题: `SetGenericType("")` 会把空值改成 `"true"`,导致非泛化语义丢失。
修复: 保留空值,空值按禁用泛化处理。
影响: `InvokeWithType` 遇到空 `generic` 会直接拒绝 typed result,避免错误反序列化。
### `filter/generic/service_test.go`
问题: 只测了 `generic=false`,没测空 `generic`。
修复: 补充空 `generic` 用例。
影响: 覆盖 reviewer 提到的边界场景。
### `internal/config.go`
问题: `ValidateGenericType` 的错误提示没包含 `false` 和 `protobuf`。
修复: 补全错误提示。
影响: 报错信息和实际支持值一致。
### `internal/config_test.go`
问题: 没验证错误提示是否包含完整合法值。
修复: 增加 `false`、`protobuf` 的断言。
影响: 防止错误提示再次漏值。
## 删除
### `filter/generic/exception.go`
问题: 只是重新导出 `hessian.GenericException`,和本 PR 核心修复无关。
修复: 删除该文件。
影响: 避免新增不必要的 public API。
### `filter/generic/exception_test.go`
问题: 只测试已删除的 `exception.go`。
修复: 一并删除。
影响: 测试范围回到本 PR 核心逻辑。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]