0

What does this Annotation @Nullable over postForObject's method mean in RestTemplate?

I want to clarify if the custom object I am getting can ever be null?

HttpEntity<CustResponse > request = new HttpEntity<>(custRequest, headers);
CustResponse custResponse = restTemplate.postForObject("url", request, CustResponse .class);

Can custResponse ever be null?

Faraz
  • 6,025
  • 5
  • 31
  • 88

1 Answers1

1

Looks like this annotation is used to avoid any auto generated warnings from code analyzer like Find Bugs. Similar question was posted here @Nullable annotation usage

Khwaja Sanjari
  • 455
  • 5
  • 17