Using the ternary operator may not make the intention clear. While it might seem fine for one or two lines, as these instances increase, they can become code smells, diminishing code quality. Hence, it's advisable to anticipate future scenarios and refactor such code for clarity and maintainability. There's no need to explicitly emphasize null-checking. Since HttpStatus is an object, there's no need to verify if the object reference is null or not. Therefore, I recommend refactoring the code accordingly.

Comment From: pivotal-cla

@backendjoa Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

Comment From: wilkinsona

Thanks for the suggestion but I prefer the code as it currently is.