Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: check existence of superclass before accessing its name #1922

Merged
merged 1 commit into from Nov 13, 2022
Merged

fix: check existence of superclass before accessing its name #1922

merged 1 commit into from Nov 13, 2022

Conversation

cyuyang
Copy link

@cyuyang cyuyang commented Oct 31, 2022

According to the JDK doc, getSuperClass() could return null.

Returns the Class representing the direct superclass of the entity (class, interface, primitive type or void) represented by this Class. If this Class represents either the Object class, an interface, a primitive type, or void, then null is returned. If this object represents an array class then the Class object representing the Object class is returned.
Returns:
the direct superclass of the class represented by this object

In our env, without a null check first, this line caused scanning of parameter types that are interfaces to throw NPE.

@cyuyang cyuyang changed the title fix: check existence of superclass before access its name fix: check existence of superclass before accessing its name Oct 31, 2022
@bnasslahsen bnasslahsen merged commit a3b8290 into springdoc:master Nov 13, 2022
@cyuyang cyuyang deleted the fix-superclass branch November 21, 2022 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants