You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Tomás Fernández Löbbe (JIRA)" <ji...@apache.org> on 2015/04/29 18:43:06 UTC

[jira] [Commented] (SOLR-7486) HttpSolrClient.shutdown() should call close() and not vice versa

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

Tomás Fernández Löbbe commented on SOLR-7486:
---------------------------------------------

In general, I think the way it is now is better for back compatibility when deprecating. If you have extended HttpSolrClient (before the addition of "close()") and overrode "shutdown()", then your code may stop working. That said, in this specific case, you are probably also calling "super.shutdown()", because otherwise the httpClients are not closed, but we can only be sure about that in this case because those are private fields.
bq. If anyone extends HttpSolrClient, he needs to override both methods to make sure things are closed properly.
If you are extending now, you should extend close(), and make sure you call super.close() at some point. That will work with 5 and trunk.

> HttpSolrClient.shutdown() should call close() and not vice versa
> ----------------------------------------------------------------
>
>                 Key: SOLR-7486
>                 URL: https://issues.apache.org/jira/browse/SOLR-7486
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Shai Erera
>            Assignee: Shai Erera
>             Fix For: 5.2
>
>         Attachments: SOLR-7486.patch
>
>
> HttpSolrClient.shutdown() is deprecated, however close() calls it instead of the other way around. If anyone extends HttpSolrClient, he needs to override both methods to make sure things are closed properly.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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