I noticed that the convenience method ResponseEntity.ok which also takes a body and delegates it to ResponseEntity.body is missing the nullable annotation which let to a sonarqube warning in my codebase when passing a null value to this convenience method.