You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Munendra S N (JIRA)" <ji...@apache.org> on 2019/07/20 12:55:00 UTC

[jira] [Resolved] (SOLR-5836) CSVConfig Invalid Check For Equals

     [ https://issues.apache.org/jira/browse/SOLR-5836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Munendra S N resolved SOLR-5836.
--------------------------------
       Resolution: Not A Problem
    Fix Version/s:     (was: 6.0)
                       (was: 4.9)

Marking it as not a problem since CSVConfig is removed from master in SOLR-13323

> CSVConfig Invalid Check For Equals
> ----------------------------------
>
>                 Key: SOLR-5836
>                 URL: https://issues.apache.org/jira/browse/SOLR-5836
>             Project: Solr
>          Issue Type: Bug
>          Components: Response Writers
>    Affects Versions: 4.6.1, 4.7
>            Reporter: Furkan KAMACI
>            Priority: Minor
>         Attachments: SOLR-5836.patch
>
>
> 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:
> {code}
>     /**
>      * 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())
>     }
> {code}
> 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.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org