bruno-roustant commented on a change in pull request #1675:
URL: https://github.com/apache/lucene-solr/pull/1675#discussion_r457174905



##########
File path: solr/core/src/java/org/apache/solr/core/SolrCore.java
##########
@@ -487,10 +488,13 @@ public String getName() {
   }
 
   public void setName(String v) {
+    Objects.requireNonNull(v);
+    boolean renamed = this.name != null && !this.name.equals(v);
+    assert !renamed || coreDescriptor.getCloudDescriptor() == null : "Cores 
are not renamed in SolrCloud";

Review comment:
       +1 to have a consistent and more pervasive approach. It would first make 
the code clearer to use, and would probably avoid bugs.




----------------------------------------------------------------
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