Solr
  1. Solr
  2. SOLR-729

Context.getDataSource(String) gives wrong DataSource instance

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: 1.3
    • Labels:
      None

      Description

      The default implementation of Context – ContextImpl#getDataSource(String) method does not use the String argument and returns the current entity's data source. The javadoc for this method in Context is also inconsistent.

      /**
         * Gets a new DataSource instance with a name.
         *
         * @param name Name of the dataSource as defined in the dataSource tag
         * @return a new DataSource instance as configured for the named entity
         * @see org.apache.solr.handler.dataimport.DataSource
         */
        public abstract DataSource getDataSource(String name);
      
      1. SOLR-729.patch
        6 kB
        Shalin Shekhar Mangar
      2. SOLR-729.patch
        4 kB
        Noble Paul
      3. SOLR-729.patch
        4 kB
        Noble Paul

        Activity

        Hide
        Noble Paul added a comment - - edited

        the javadoc itself was wrong

        fixes this issue

        Show
        Noble Paul added a comment - - edited the javadoc itself was wrong fixes this issue
        Hide
        Noble Paul added a comment -
        • final fix and javadocs cleanup
        Show
        Noble Paul added a comment - final fix and javadocs cleanup
        Hide
        Shalin Shekhar Mangar added a comment -

        Promoting to major since it makes many use-cases very difficult to implement.

        Show
        Shalin Shekhar Mangar added a comment - Promoting to major since it makes many use-cases very difficult to implement.
        Hide
        Shalin Shekhar Mangar added a comment -

        Marking this bug for 1.3

        Show
        Shalin Shekhar Mangar added a comment - Marking this bug for 1.3
        Hide
        Shalin Shekhar Mangar added a comment -

        Updated patch with a test case which reproduces the bug and verifies the fix.

        I plan to commit this shortly.

        Show
        Shalin Shekhar Mangar added a comment - Updated patch with a test case which reproduces the bug and verifies the fix. I plan to commit this shortly.
        Hide
        Shalin Shekhar Mangar added a comment -

        Committed revision 689867.

        Thanks Noble!

        Show
        Shalin Shekhar Mangar added a comment - Committed revision 689867. Thanks Noble!

          People

          • Assignee:
            Shalin Shekhar Mangar
            Reporter:
            Shalin Shekhar Mangar
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development