[testng-dev] TestNG 6.8.5, 6.8.6 XmlClass equals() is inconsistent with hashCode()

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[testng-dev] TestNG 6.8.5, 6.8.6 XmlClass equals() is inconsistent with hashCode()

hopwire
Hello!

I found that comparison by class index was removed from XmlClass.equals() but hashCode() still uses class index. I know that testng doesn't support multiple similar classes in one <test> so this bug doesn't contradict the expected behavior. But I made some experiments with testng and was wondered after I got a Set with 2 equal XmlClasses. My xml config had 2 similar classes in one test. The classes were equal according to equals() method but after I put them into Set it contained both classes. I think this issue should be fixed to prevent hard to find bugs in future.

Thank you.

--
You received this message because you are subscribed to the Google Groups "testng-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-dev.
For more options, visit https://groups.google.com/groups/opt_out.