Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Related Rants
I had written a feature that stored some data for all methods in a code base. And it worked in 99.9% of all cases, but for some projects, somehow there were errors in the logs that I couldn't understand.
After hours of debugging, it turned out that I inserted the method objects into a map, and the (existing) base class for these objects used the character offsets for the method's start & end in the hashCode() implementation. This meant that in the (extremely rare) case of two methods in two files with the exact same start and end offsets, inserting them into a map would overwrite the previous value.
Once uncovered, this bug was trivial to fix ;)
rant
bugfix
wk117