apache / apache/servicecomb-java-chassis
[BUG] - result may be null, causing NPE
- Dominant language
- Java
- Stars
- 1.9k
- Forks
- 814
- Avg merge
- 8d 23h
- Merged PRs (30d)
- 1
Description
### 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_
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the failure with JDK 21, Swagger 3, and a Java bean containing an Exception property, then capture the full stack trace to identify the schema-conversion entry point. Trace the conversion that produces a null Schema and verify that the same bean converts without a NullPointerException; the issue does not name a source file or test to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100