trebol-ecommerce / trebol-backend-monolith

Monolithic eCommerce backend web application that exposes a RESTful API.
MIT License
16 stars 21 forks source link

[Sonar] Remove this expression which always evaluates to "true" in `src/main/java/org/trebol/jpa/services/conversion/BillingTypesConverterJpaServiceImpl.java` #183

Closed bglamadrid closed 1 year ago

bglamadrid commented 1 year ago

Summary

shivam-Purohit commented 1 year ago

hey @bglamadrid I can take on this issue if you like .

if (!name.isBlank() && !target.getName().equals(name)) { target.setName(name); } this will do I guess? removing the name != null or anything else do I need to do?

bglamadrid commented 1 year ago

@shivam-Purohit Correct, it is pretty much that simple! The Sonar issue itself explains it pretty well I think 🙂 the comparison to null is redundant because name has a non-null constraint