How to succinctly nullify the attributes of an object?

1. Use SpringMVC to inject request parameters into attributes, and how to null some of them, so as to avoid code clutter caused by a large number of OR statements

public ResponseEntity<ResponseModel> apply(@RequestBody Param para, HttpServletRequest request)

2. A lot of if statements are used to null the parameters of Para. Is there any good way to make the code more concise?

Mar.21,2021
Menu