'when taking a pageable response value SpotBugs has NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE
I have spotbug dependency in maven and after running the mvn install command.
I see the following error
[line 111]Known null at TaskProcessListener.java:[line 111] NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE
the above error pointing this code
private ResponseBody convertPageToList(ResponseEntity<ResponseUser> response) {
ResponseBody responseBody=null;
if(response.getBody()!=null)
responseBody=response.getBody().getResponseBody();
if(responseBody!=null)
return responseBody;
return null;
}
and the content of ResponseBody class is:
public class ResponseBody<T>{
@JsonProperty("users_page")
PaginatedResponse<T> usersPage;
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
