uschindler commented on PR #14074:
URL: https://github.com/apache/lucene/pull/14074#issuecomment-2548724672

   > > For the future: If people submit PRs about making private members which 
are collections public, always check if the immutability could be violated. 
This is a major problem in Java where collections are by default mutable!
   > 
   > +1
   > 
   > Is this something a static checker could catch?
   
   I thought about this, too. But a checker like this is hard to implement. 
Maybe there's an option in newest version of errorprone, but I don't think it's 
easy: https://errorprone.info/bugpattern/Immutable -- this requires consistent 
use of some annotation in source code to mark all compoents immutable.


-- 
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...@lucene.apache.org

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