Closed JordanSamhi closed 4 months ago
That's interesting. I guess we didn't have the return type so far, because inside the same application, you can't have two methods that only differ in their return type. That wouldn't be a valid overload.
You are right, but we are currently doing something that triggers this corner case: extraction of a bunch of methods from multiple apps and constituting a single set of those methods in a single program.
Hence, while adding an element to a set the equals()
method is triggered and was skipping some of them because of this problem.
Two methods that are different are considered as the same because of the way the
equals()
method is implemented:After the small fix: