GitHub user BruceKuiLiu opened a pull request:
https://github.com/apache/commons-lang/pull/298
Add an instanceof test in the implementation of equals(Object obj).
The equals(Object obj) method shouldn't make any assumptions about the type
of obj. It should simply return false if obj is not the same type as this.
http://findbugs.sourceforge.net/bugDescriptions.html#BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/BruceKuiLiu/commons-lang trunk
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/commons-lang/pull/298.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #298
----
commit 0ee26c5f74558628740b8347a9624efc65c86012
Author: Kui LIU <[email protected]>
Date: 2017-10-09T18:17:23Z
Add an instanceof test in the implementation of equals(Object obj).
The equals(Object obj) method shouldn't make any assumptions about the type
of obj. It should simply return false if obj is not the same type as this.
http://findbugs.sourceforge.net/bugDescriptions.html#BC_EQUALS_METHOD_SHOULD_WORK_FOR_ALL_OBJECTS
----
---