[ 
https://issues.apache.org/jira/browse/SOLR-10778?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Erick Erickson updated SOLR-10778:
----------------------------------
    Description: 
During precommit we are seeing lots of warnings. Im turning this into an 
umbrella issue about getting precommit warnings out of the code in general. 
Yes, this will take a while.

See SOLR-10809 for getting all warnings out of solr/core. I want to selectively 
have precommit fail when "some part" of the code is clean so we don't 
backslide, and solr/core was the finest granularity I could see how to change.

If you read more of the comments here, you can see that there are some serious 
code refactoring that could be done. I'm electing to simply SuppressWarnings 
rather than re-arrange code at this point whenever the code is tricky. If 
anyone goes back in and tries to clean the code up, then can remove the 
annotation(s).

  was:
During precommit we are seeing lots of warnings about resources that aren't 
being closed, which could pose problems based on chat amongst the team. Log 
snippet for example:

    [mkdir] Created dir: 
/var/folders/5p/6b46rm_94dzc5m8d4v56tds40000gp/T/ecj1165341501
 [ecj-lint] Compiling 419 source files to 
/var/folders/5p/6b46rm_94dzc5m8d4v56tds40000gp/T/ecj1165341501
 [ecj-lint] ----------
 [ecj-lint] 1. WARNING in 
/path/to/lucene-solr/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttpSolrClient.java
 (at line 920)
 [ecj-lint]     new LBHttpSolrClient(httpSolrClientBuilder, httpClient, 
solrServerUrls) :
 [ecj-lint]     
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 [ecj-lint] Resource leak: '<unassigned Closeable value>' is never closed
 [ecj-lint] ----------
 [ecj-lint] ----------
 [ecj-lint] 2. WARNING in 
/path/to/lucene-solr/solr/solrj/src/java/org/apache/solr/client/solrj/impl/StreamingBinaryResponseParser.java
 (at line 49)
 [ecj-lint]     JavaBinCodec codec = new JavaBinCodec() {
 [ecj-lint]                  ^^^^^
 [ecj-lint] Resource leak: 'codec' is never closed
 [ecj-lint] ----------
 [ecj-lint] ----------
 [ecj-lint] 3. WARNING in 
/path/to/lucene-solr/solr/solrj/src/java/org/apache/solr/client/solrj/request/JavaBinUpdateRequestCodec.java
 (at line 90)
 [ecj-lint]     JavaBinCodec codec = new JavaBinCodec();
 [ecj-lint]                  ^^^^^
 [ecj-lint] Resource leak: 'codec' is never closed
 [ecj-lint] ----------
 [ecj-lint] 4. WARNING in 
/path/to/lucene-solr/solr/solrj/src/java/org/apache/solr/client/solrj/request/JavaBinUpdateRequestCodec.java
 (at line 113)
 [ecj-lint]     JavaBinCodec codec = new JavaBinCodec() {
 [ecj-lint]                  ^^^^^
 [ecj-lint] Resource leak: 'codec' is never closed


> Ant precommit task WARNINGS
> ---------------------------
>
>                 Key: SOLR-10778
>                 URL: https://issues.apache.org/jira/browse/SOLR-10778
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: clients - java
>    Affects Versions: 4.6
>            Reporter: Andrew Musselman
>            Assignee: Erick Erickson
>            Priority: Minor
>         Attachments: dated-warnings, dated-warnings.log, notclosed.txt
>
>
> During precommit we are seeing lots of warnings. Im turning this into an 
> umbrella issue about getting precommit warnings out of the code in general. 
> Yes, this will take a while.
> See SOLR-10809 for getting all warnings out of solr/core. I want to 
> selectively have precommit fail when "some part" of the code is clean so we 
> don't backslide, and solr/core was the finest granularity I could see how to 
> change.
> If you read more of the comments here, you can see that there are some 
> serious code refactoring that could be done. I'm electing to simply 
> SuppressWarnings rather than re-arrange code at this point whenever the code 
> is tricky. If anyone goes back in and tries to clean the code up, then can 
> remove the annotation(s).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to