-
-
Notifications
You must be signed in to change notification settings - Fork 26.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
📍Use lombok, reformat, and optimize the code #1560
Conversation
Hi @iluwatar |
Hi @sumitaccess007, this pull request already uses lombok library. |
Sync masters
@iluwatar, can you please review the PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a very long Pull Request and will take time to get reviewed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have also seen that you have made changes in Junit code as well.
But have not mentioned it in the PR description.
It would be great if you could provide a solid documentation for each changes in the PR.
There are conflicts that need to be resolved @va1m |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good to me and we can merge it once the conflict have been resolved.
- In the future please keep the pull request scope smaller, for example one PR per pattern would be much easier to review and merge quickly. It takes an hour or two to even read through the changes when there are 692 files changed.
- Try to avoid incorporating unrelated changes in the same pull request. Like here there were hundreds of changes in test files, reformatting and small bug fixes.
- I added a page to our wiki collecting the allowed Lombok annotations: https://github.com/iluwatar/java-design-patterns/wiki/18.-Lombok Please comments if there's something missing that we are using/want to use
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@va1m Can you please look at what are the changes that is breaking the code.
Thanks.
Instead of introducing Lombok, use Java 16 and records wherever possible. Also, be aware that record builders are also in works. |
Thanks @MrR0807 this looks very interesting development indeed. However, currently the project is on Java 11 level and it will take some time to get us compatible with Java 16. What we can do at this stage is to create an issue about this so we can get back to it at some later stage. |
@va1m this PR has been inactive for a long time, we will close it soon if we do not see any updates. |
SonarCloud Quality Gate failed. |
@iluwatar I fixed the conflicts but I have no idea how to fix the sonarCloud issue https://sonarcloud.io/project/issues?id=iluwatar_java-design-patterns&open=AXgOdcr_XiJrFJc0KlII&pullRequest=1560&resolved=false&severities=MAJOR&types=CODE_SMELL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@va1m you need to provide test cases to increase code coverage.
I believe this issue can be fixed just by refactoring it into two separate chunks. @va1m |
I didn't append new code and code coverage shouldn't being decreased. If it happened then probably it's a SonarQube configuration issue related to lombok and it should be configured accordingly. Anyway, I have no more time to spend on this pr. Feel free to finish it yourself if you need it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are extremely thankful for this huge contribution @va1m! I think these numbers tell a great story of how much boilerplate it removed: @all-contributors please add @va1m for code |
I've put up a pull request to add @va1m! 🎉 |
Use lombok
Pull request description
@Slf4j
instead of LOGGER var definition and initialisation@Getter
and@Setter
instead of vanila java implementations@ToString
instead of custom implementations@EqualsAndHashcode
instead of manually createdequals()
andhashCode()
public
for test methods using JUnit5