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
  • 5,467
  • 5
  • 22
  • 73

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
  • 415
  • 5
  • 16