trebol-ecommerce / trebol-backend-monolith

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

[Sonar] Add a private constructor to hide the implicit public one - `src/main/java/org/trebol/config/Constants.java` #178

Closed bglamadrid closed 1 year ago

bglamadrid commented 1 year ago

Summary

ujwalkumar1995 commented 1 year ago

Hey @bglamadrid As far as my understanding, if we use the NoArgsConstructor annotation form lombok and mark this class as final, then it should solve the problem. Let me know if my understanding is correct and I can try to fix this.

bglamadrid commented 1 year ago

Hi @ujwalkumar1995

Yes, making it final could also improve on the concept. But the important bit is to ensure the constructor is private. And @NoArgsConstructor does have a way to generate that.

Don't hesitate to submit a PR if you want to, anyway 🙂 You don't have to nail everything down from the get-go, I (think I?) am pretty forgiving with my reviews.