-
Notifications
You must be signed in to change notification settings - Fork 22
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
Generic types cannot be customized #33
Comments
Hi @TWiStErRob, Good spot on this - definitely looks like a bug to me. Your second line,
should work. The The problem seems to be with the way the |
Thanks for the quick reply. Hint: when I debugged the equality was failing because one of the maps had |
Yea that's exactly it - the equality check is looking at the name and the type. If I remove the check on the name it works and all existing tests pass. I want to make sure I understand why it works/why I had that check in there in the first place, but I reckon this should be ok |
How about |
The original code used Lombok to auto generate the equals and hashcode which looked at all the fields to do that. I de-lomboked ages ago and kept the default implementation. Unfortunately the implementation in I'll make that change now and include your test case to avoid regressions. Thanks! |
As I see then |
Yea I'm thinking of not using
What do you think? |
Yes, I see that would work. It keeps order and compares what we're interested in, given that what |
… name as it was causing a bug when overriding generic types. Fixes #33
@richkeenan can you please release this? (also README.md version is out of date) |
That's done. Sorry for the delay, 2.7.1 should be up on Maven Central once it's synced with Nexus. Going forward I don't plan on actively maintaining this project because I don't use it (or Java) and it's always a struggle to back into developing it! I'll update the readme to make that clear too. Thanks so much for your support and raising issues that you've found and I'll obviously accept PRs for things you want in the library that I like. Cheers, |
… name as it was causing a bug when overriding generic types. Fixes FlexTradeUKLtd#33 (FlexTradeUKLtd#34)
How can I make this test pass?
it fails with:
because:
GenericTypeCollection.equals
fails onnameTypeMap
comparison which leads toCustomBuilder.create
skip thesupplier
and returnNoSpecimen
resulting in default behavior.The text was updated successfully, but these errors were encountered: