Return-Path: Delivered-To: apmail-lucene-solr-dev-archive@minotaur.apache.org Received: (qmail 86311 invoked from network); 21 May 2009 12:39:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 May 2009 12:39:58 -0000 Received: (qmail 8747 invoked by uid 500); 21 May 2009 12:40:10 -0000 Delivered-To: apmail-lucene-solr-dev-archive@lucene.apache.org Received: (qmail 8683 invoked by uid 500); 21 May 2009 12:40:10 -0000 Mailing-List: contact solr-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-dev@lucene.apache.org Delivered-To: mailing list solr-dev@lucene.apache.org Received: (qmail 8673 invoked by uid 99); 21 May 2009 12:40:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 May 2009 12:40:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 May 2009 12:40:07 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5674F234C052 for ; Thu, 21 May 2009 05:39:46 -0700 (PDT) Message-ID: <48449680.1242909586353.JavaMail.jira@brutus> Date: Thu, 21 May 2009 05:39:46 -0700 (PDT) From: "Mark Miller (JIRA)" To: solr-dev@lucene.apache.org Subject: [jira] Commented: (SOLR-916) CoreContainer :: register(String, SolrCore, boolean) documentation clarification about returnPrev argument In-Reply-To: <625947954.1229369984282.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/SOLR-916?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12711599#action_12711599 ] Mark Miller commented on SOLR-916: ---------------------------------- I would say that if returnPrev is false, what is returned is undefined. The closed core is returned, but it just as well could be null. If the user expects to get and be able to use the prevCore, he must pass returnPrev = true. It still makes sense to me, but I wouldn't object to the change if someone wants to put it in. > CoreContainer :: register(String, SolrCore, boolean) documentation clarification about returnPrev argument > ----------------------------------------------------------------------------------------------------------- > > Key: SOLR-916 > URL: https://issues.apache.org/jira/browse/SOLR-916 > Project: Solr > Issue Type: Improvement > Affects Versions: 1.3 > Environment: Tomcat 6, JRE 6 > Reporter: Kay Kay > Priority: Minor > Fix For: 1.4 > > Attachments: SOLR-916.patch > > Original Estimate: 2h > Remaining Estimate: 2h > > In CoreContainer.java :: register(name, core, returnPrev) - the documentation says > it would return a previous core having the same name if it existed *and returnPrev = true*. > * @return a previous core having the same name if it existed and returnPrev==true > */ > public SolrCore register(String name, SolrCore core, boolean returnPrev) .. > But as per the code towards the end - the previous core is returned anyway, irrespective of the value of returnPrev. The difference, though, seems to be that when returnPrev is false, the previous core (of the same name, if exists) is closed. > Which one of them is correct . If the code were correct , would the variable be better renamed as closePrevious , as opposed to returnPrevious. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.