malliaridis commented on PR #2881:
URL: https://github.com/apache/solr/pull/2881#issuecomment-2646309035

   Thanks for your feedback @uschindler 😄
   
   > Please be still careful to not use the plural s classes during 
initialization on the original class. This would reintroduce the problems.
   
   I believe this is not the case, and I hope error-prone would identify such 
cases.
   
   > If you have accessor methods, you can use the holder pattern used in 
Lucene.
   
   I haven't used this pattern before. Would 
[`TimeSources.get(type)`](https://github.com/apache/solr/blob/b34abd5a5016f125174cd036cd7b3273efe6345a/solr/solrj/src/java/org/apache/solr/common/util/TimeSources.java#L49)
 (previously `TimeSource.get(type)`) be such a scenario where this pattern 
could be used?
   
   I guess in cases where the instances are public and directly accessed or 
added to a list with `static { ... }` the holder pattern cannot be used?


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

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

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


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

Reply via email to