-
Notifications
You must be signed in to change notification settings - Fork 66
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
change code according to Clean Code rules #281
Conversation
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.
Thanks for the cleanup!
I've added a couple of comments that I think should be addressed.
Thanks for the comments. What do you think about the open tasks I mentioned. should I open some issues? I think the last three should be resolved, but there would be braking changes as well. |
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.
Thanks for the follow-up. I just noted one detail there in XmlQualifierType.
Regarding the other open tasks, here are my thoughts:
Could be good to simplify a bit, but it's stable code, so really low prio and maybe not worth it in some cases. I'll have a look at the last ones in the list, as they could be broken into smaller methods for readability.
It's auto-generated code. I'd say it shouldn't be changed, but instead ignored from analysis
There are instantiated via DI, so no caller would benefit from the builder. If anything, this may illustrate that responsibilities could be "grouped" somehow to avoid so many dependencies. Not sure.
The clone method comes from the implemented interface, plus it's a private class. IF you find a way to get rid of the warning, feel free to fix.
This one comes from |
There is one more:
|
Unfortunately its not easily possible the change the Optional to |
I'll handle those other improvements. Thanks for the suggestions. |
Is there a chance of a new release containing this changes anytime soon? |
Yeah, I'll push one out soon. |
Thanks for the release. I could already integrate it in my project. One remark for the release notes: it not "Guice to 6.0.0" but "Guice to 7.0.0". |
I made some changes again. I think I finished this work now.
What one could do further:
AssertDoesNotThrow(()->)
in this cases. But I don't think that's worth it.private static class AllCertificatesSelector implements Selector<X509CertificateHolder>
: A copy constructor, copy factory or a custom copy function are suitable alternatives to the Object.clone