Skip to content

[BUG] - result may be null, causing NPE #4756

@liljdd

Description

@liljdd

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions