-
-
Notifications
You must be signed in to change notification settings - Fork 353
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
review: refactor: reference comparison between List and Set #4011
review: refactor: reference comparison between List and Set #4011
Conversation
Hi @SirYwell, and welcome to Spoon! There's no doubt that what you found here is a bug. However, as you suggest, fixing it doesn't actually change any behavior. I think the reason for that is that the entire To me, it looks like you could just entirely remove the affected if-statement without changing behavior. WDYT? |
On a completely unrelated side note, I spotted another bug here: |
Indeed, that would work too. I wasn't sure about the On your side note: I saw that too and randomly checked another place where it is used. I ended up in |
7c83908
to
169d0dc
Compare
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.
LGTM, will merge after 24 hour wait to let other integrators have a say.
I saw that too and randomly checked another place where it is used. I ended up in CtEnumImpl#setEnumValues, where it isn't called when passing null but it is called when passing an empty list.
It's, let's say, wildly inconsistent. There's currently nothing enforcing the way listeners are called, and so it's really hard to make it all consistent. We're looking into how we can shape it up to be more consistent.
Oh, and a small request from my part: avoid force pushing when you have received feedback on your PR. It's a bit confusing as a reviewer to have previously reviewed commits disappear :)
@SirYwell Congrats on your first contribution! If you enjoy refactoring, there's lots of room for improvement throughout Spoon to improve the general code quality. You can pretty much open any random class and find plenty of things to improve. Remove dead or redundant code is of course the most satisfying refactoring there is, so nice work on finding this one :) |
When the underlying data structure in CtIntersectionTypeReferenceImpl was changed (#659), one reference check wasn't changed. From what I've seen that didn't introduce any behavioral changes other than the parameters passed to
onListDeleteAll
.I didn't find any contracts for that method, that's why I consider it to be a refactoring instead of a bug fix. If that's wrong, please let me know.