dsmiley commented on a change in pull request #1675:
URL: https://github.com/apache/lucene-solr/pull/1675#discussion_r460365884
##########
File path: solr/core/src/java/org/apache/solr/core/SolrCore.java
##########
@@ -497,10 +498,13 @@ public String getName() {
}
public void setName(String v) {
+ Objects.requireNonNull(v);
+ boolean renamed = this.name != null && !this.name.equals(v);
Review comment:
I must check if this.name != null because I don't want to consider an
initial population (from constructor) a _rename_ even though in some sense one
could argue it is.
I'll follow up this PR with removal of the existence of `logid` which will
have the effect of simplifying setName which will in turn make it clearer to
have the constructor simply set the name without calling _setName_. At that
point I might also rename setName to rename and ensure it's only called to
actually do a rename. Right now the constructor deserves to be calling
setName because it populates `logid` and I wouldn't want that logic duplicated.
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]