gerlowskija opened a new pull request #1728:
URL: https://github.com/apache/lucene-solr/pull/1728


   # Description
   
   Currently, many SolrRequest classes (e.g. UpdateRequest) don't implement 
`equals()` or `hashCode()`.  This isn't a problem for Solr's normal operation, 
but it can be a barrier in unit testing SolrJ client code. `equals()` 
implementations would make it much easier to assert that client code is 
building the request that developers think it's building.
   
   # Solution
   
   This takes the first baby step towards remedying this by adding `equals` and 
`hashCode` implementations for a few SolrRequest implementations.  Specifically 
the base SolrRequest, UpdateRequest, and CollectionAdminRequest and all its 
subclasses.
   
   In an effort to simplify, I've standardized on using 
EqualsBuilder/HashCodeBuilder for these classes.  It relies on apache-commons, 
but since that's already a dependency of SolrJ I don't think this is a problem. 
 It results in much simpler code than writing the required logic by hand.
   
   # Tests
   
   None yet but some forthcoming.
   
   # Checklist
   
   Please review the following and check all that apply:
   
   - [X] I have reviewed the guidelines for [How to 
Contribute](https://wiki.apache.org/solr/HowToContribute) and my code conforms 
to the standards described there to the best of my ability.
   - [X] I have created a Jira issue and added the issue ID to my pull request 
title.
   - [X] I have given Solr maintainers 
[access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork)
 to contribute to my PR branch. (optional but recommended)
   - [X] I have developed this patch against the `master` branch.
   - [ ] I have run `ant precommit` and the appropriate test suite.
   - [ ] I have added tests for my changes.
   - [X] I have added documentation for the [Ref 
Guide](https://github.com/apache/lucene-solr/tree/master/solr/solr-ref-guide) 
(for Solr changes only).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to