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

Erick Erickson updated SOLR-14533:
----------------------------------
    Attachment: SOLR-14533.patch
        Status: Open  (was: Open)

Changed a couple of things:

1> it's rarely (never?) the right thing to do to throw an exception from a test 
method, JUnit will deal with that.

2> AutoCloseable.close(). We crossed wires a bit. And no big deal at all, just 
for future reference. I looked at the JavaDocs for AutoCloseable.close(), and 
it's _strongly_ advised to throw a concrete exception rather than Exception, 
even though that's the method signature for AutoCloseable.close(). I'd already 
changed the method signature for some classes that implement 
AutoCloseable.close (SolrMetricProducer is case in point) to throw an 
IOException rather than Exception. That rippled through a couple of 
try-with-resources blocks and needed adding a catch (IOException) block. This 
is just in case you run into this in future so you won't scratch your head.

3> <2> notwithstanding, I had to make a few changes for the 8x backport because 
the AutoCloseable interface hadn't been added to one of the metrics classes, 
but I'm not going to put up a separate patch for that...


Attached is a patch with the rest of the warnings removed.

Thanks again!

> Fix or suppress warnings in solr/handler/admin
> ----------------------------------------------
>
>                 Key: SOLR-14533
>                 URL: https://issues.apache.org/jira/browse/SOLR-14533
>             Project: Solr
>          Issue Type: Sub-task
>            Reporter: Erick Erickson
>            Assignee: Erick Erickson
>            Priority: Major
>         Attachments: SOLR-14533.patch, SOLR-14533.patch
>
>




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