Details
-
Bug
-
Status: Closed
-
Trivial
-
Resolution: Fixed
-
1.7
-
None
-
None
Description
Using Object.equals to test for equality of a CharSequence is wrong:
CharSequence cs1, cs2; cs1.equals(cs2);
The Unit test passes because the test uses the same String on both sides. When I changed the unit test to wrap the string with a CharSequence interface it fails.
It should be replaced with:
CharSequence cs1, cs2; StringUtils.equals(cs1, cs2);
Attachments
Issue Links
- links to