[ 
https://issues.apache.org/jira/browse/LUCENE-9497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17188858#comment-17188858
 ] 

Varun Thacker commented on LUCENE-9497:
---------------------------------------

Here is the first error ( options.errorprone.disableAllWarnings = true )

 
{code:java}
/Users/vthacker/apache-work/lucene-solr/lucene/core/src/java/org/apache/lucene/codecs/blocktree/BlockTreeTermsWriter.java:712:
 error: [ArrayToString] Calling toString on an array does not provide useful 
information
          assert StringHelper.startsWith(term.termBytes, prefix): "term.term=" 
+ term.termBytes + " prefix=" + prefix;
                                                                                
     ^
    (see https://errorprone.info/bugpattern/ArrayToString)
  Did you mean 'assert StringHelper.startsWith(term.termBytes, prefix): 
"term.term=" + Arrays.toString(term.termBytes) + " prefix=" + prefix;'?
/Users/vthacker/apache-work/lucene-solr/lucene/core/src/java/org/apache/lucene/codecs/blocktree/BlockTreeTermsWriter.java:744:
 error: [ArrayToString] Calling toString on an array does not provide useful 
information
            assert StringHelper.startsWith(term.termBytes, prefix): 
"term.term=" + term.termBytes + " prefix=" + prefix;
                                                                                
       ^
    (see https://errorprone.info/bugpattern/ArrayToString)
  Did you mean 'assert StringHelper.startsWith(term.termBytes, prefix): 
"term.term=" + Arrays.toString(term.termBytes) + " prefix=" + prefix;'?
2 errors
{code}
 

 

> Integerate Error Prone ( Static Analysis Tool ) during compilation
> ------------------------------------------------------------------
>
>                 Key: LUCENE-9497
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9497
>             Project: Lucene - Core
>          Issue Type: Task
>            Reporter: Varun Thacker
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Integrate [https://github.com/google/error-prone] during compilation of our 
> source code to catch mistakes



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to