benwtrent commented on issue #11910:
URL: https://github.com/apache/lucene/issues/11910#issuecomment-1309035065

   I think static analysis will be a significant help.
   
   So, I did a quick check at turning on `IntLongMath` for `error-prone` and it 
is noisy. 
   
   Its flagging things like this as bad behavior:
   ```java
   long function(int v) {
      return v - 2;
   }
   ```
   or this
   ```java
   long foo() {
     return 2 * 2
   }
   ```
   
   As an aside, almost every single `long ramBytesUsed()` is flagged as 
auto-cast since it returns `long` but there are things like `2 * 
Integer.BYTE_VALUE`. 
   
   We may need something more nuanced or focused besides `error-prone`


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