Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-916

CoreContainer :: register(String, SolrCore, boolean) documentation clarification about returnPrev argument

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.3
    • 1.4
    • None
    • None
    • Tomcat 6, JRE 6

    Description

      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.

      Attachments

        1. SOLR-916.patch
          1 kB
          Karthik K

        Activity

          People

            noble.paul Noble Paul
            kaykay.unique Karthik K
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Remaining Estimate - 2h
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified