apache / apache/servicecomb-java-chassis
[BUG] - result may be null, causing NPE
未关闭
question
- 主要语言
- Java
- 星标
- 1.9k
- 派生
- 814
- 平均合并
- 8 天 23 小时
- 30 天内合并 PR
- 1
描述
### Steps to Reproduce
1. env:jdk21+swagger3
2. a java bean has "Exception" property,eg.@Data
public class Blog {
private Exception exception;
}
3. the bean to swagger's Schema object
4. runtime errors:java.lang.NullPointerException: Cannot invoke "io.swagger.v3.oas.models.media.Schema.get$ref()" because "result" is null
### Expected Behavior
Rectify the NPE.
### Servicecomb Version
3.2.0
### Additional Context
_No response_
贡献指南
这个仓库没有索引到贡献指南
调研方向
使用 JDK 21、Swagger 3 以及包含 Exception 属性的 Java bean 重现该故障,然后捕获完整的 stack trace,以确定 Schema 转换的入口点。跟踪生成 null Schema 的转换,并验证同一个 bean 可以在不出现 NullPointerException 的情况下完成转换;该 issue 未指定要运行的源文件或测试。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, openapi
- 领域
- api
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100