Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Not A Problem
-
4.6.1, 4.7
-
None
-
None
Description
When I was checking the source code of Solr I realized that equals method at CSVConfig.java does an unnecessary or invalid checking as follows:
/** * TODO.. * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(Object obj) { if (obj == null && !(obj instanceof CSVConfig)) { return false; } return super.equals(obj); // CSVConfig config = (CSVConfig) obj; // getFill() == config.getFill() // getFields().equals(config.getFields()) }
if obj is null it can not be an instance of CSVConfig so it is unnecessary. On the other hand it does not make a valid check so I have changed the equals criteria to OR.