rmuir opened a new issue, #11932: URL: https://github.com/apache/lucene/issues/11932
### Description A great overflow issue: https://errorprone.info/bugpattern/NarrowingCompoundAssignment javac is getting its own checker for this in version 20 so eventually we can switch to that one. But for now, i'd like to try to enable the error-prone version. in a nutshell, compound assignment operators are totally lenient: ``` jshell> byte x = 0; x ==> 0 jshell> x = x + Long.MAX_VALUE; | Error: | incompatible types: possible lossy conversion from long to byte | x = x + Long.MAX_VALUE; | ^----------------^ jshell> x += Long.MAX_VALUE; $2 ==> -1 ``` -- 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.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