Solr
  1. Solr
  2. SOLR-4931

Override exact signatures (with generics) in SolrDeletionPolicy

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 4.3
    • Fix Version/s: 4.4
    • Component/s: None
    • Labels:
      None

      Description

      LUCENE-4876 changed the IndexDeletionPolicy to an abstract class. The SolrDeletionPolicy extends this class but overrides the onInit and onCommit methods with non generic parameters. This makes people who extend SolrDeletionPolicy (even though we don't recommend doing that) run into a Java6 bug:
      http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6775192

      The workaround is to use reflection to call the parent class's method. I propose that we change SolrDeletionPolicy to override parent's methods with the exact signature.

      1. SOLR-4931.patch
        4 kB
        Shalin Shekhar Mangar
      2. SOLR-4931.patch
        3 kB
        Shalin Shekhar Mangar

        Activity

        Hide
        Shalin Shekhar Mangar added a comment -

        Changed SolrDeletionPolicy onInit and onCommit to use the exact generic params as the parent. All tests pass. I'll commit shortly.

        Show
        Shalin Shekhar Mangar added a comment - Changed SolrDeletionPolicy onInit and onCommit to use the exact generic params as the parent. All tests pass. I'll commit shortly.
        Hide
        Shalin Shekhar Mangar added a comment -

        The correct patch this time.

        Show
        Shalin Shekhar Mangar added a comment - The correct patch this time.
        Hide
        Commit Tag Bot added a comment -

        [trunk commit] shalin
        http://svn.apache.org/viewvc?view=revision&revision=1493871

        SOLR-4931: SolrDeletionPolicy onInit and onCommit methods changed to override exact signatures (with generics) from IndexDeletionPolicy

        Show
        Commit Tag Bot added a comment - [trunk commit] shalin http://svn.apache.org/viewvc?view=revision&revision=1493871 SOLR-4931 : SolrDeletionPolicy onInit and onCommit methods changed to override exact signatures (with generics) from IndexDeletionPolicy
        Hide
        Commit Tag Bot added a comment -

        [branch_4x commit] shalin
        http://svn.apache.org/viewvc?view=revision&revision=1493872

        SOLR-4931: SolrDeletionPolicy onInit and onCommit methods changed to override exact signatures (with generics) from IndexDeletionPolicy

        Show
        Commit Tag Bot added a comment - [branch_4x commit] shalin http://svn.apache.org/viewvc?view=revision&revision=1493872 SOLR-4931 : SolrDeletionPolicy onInit and onCommit methods changed to override exact signatures (with generics) from IndexDeletionPolicy
        Hide
        Steve Rowe added a comment -

        Bulk close resolved 4.4 issues

        Show
        Steve Rowe added a comment - Bulk close resolved 4.4 issues

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development