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
NullPointerException when extending controller classes with multiple parameterized types #953
Comments
Hmm might be a bug :) thanks for reporting. I'll take a look |
It looks like this issue still persists in Springfox 2.3.0. Did the fix for this not get included in the new release? To illustrate, creating an abstract controller defined as |
May not have been fixed completely? need to investigate |
@woemler It seems to work as expected. Closing this issue with a proving test |
@dilipkrish: Thanks, I'll take a look. |
@dilipkrish fyi i ran into this exact same exception using 2.3.1... I am also using an abstract base class that has multiple generic parameters like so:
I had a method like so:
The above code generated the same or similar exception as to what was posted above. I was able to fix the issue by more strictly typing the return value like so:
Anyhow, I wanted to post this here before making a new issue for it to make sure this was actually different issue. Here is the exact trace I was encountering before fixing it:
|
@elennick : Thanks for posting this. I meant to comment back here after testing, but I ran into the same problem/solution as you. My code still was not working with version 2.3.1, but then I noticed that changing my return type from |
|
I have an abstract base controller class that is parameterized in much the same way as Spring Data
PagingAndSortingRepository
, with multiple subclasses that extend it. I have noticed when running unit tests that if SpringFox attempts to document a controller class with more than one parametrized type will always result in aNullPointerException
, regardless of whether the second parameterized type is even used in the class:The exception will occur, regardless of the types used. Replacing the parameterization with concrete types will make this error go away.
The text was updated successfully, but these errors were encountered: