#35 MimeType.equals breaks the equals contract

open
Code (14)
5
2012-01-20
2012-01-20
Henri Tremblay
No

The MimeType equals can be compared with a String. This is unintuitive since it totally breaks the Object.equals contract. For instance, I just migrate from
commons-lang 2.5 to commons-lan 2.6.

I had this code:
ArraysUtils.contains(mimeTypeArray, str);

Used to work in 2.5, doesn't in 2.6.

Really dangerous. Please remove the string comparison. Equals should be symetric.

Discussion