Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-2953

PriorityQueue is inheriently broken if subclass attempts to use "heap" w/generic T bound to anything other then "Object"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.2, 4.0-ALPHA
    • None
    • None
    • New, Patch Available

    Description

      as discovered in SOLR-2410 the fact that the protected "heap" variable in PriorityQueue is initialized using an Object[] makes it impossible for subclasses of PriorityQueue to exist and access the "heap" array unless they bind the generic to Object.

      Attachments

        1. BenchmarkArrayAccess.java
          3 kB
          Dawid Weiss
        2. LUCENE-2953.patch
          18 kB
          Uwe Schindler
        3. LUCENE-2953.patch
          1 kB
          Chris M. Hostetter

        Issue Links

          Activity

            People

              uschindler Uwe Schindler
              hossman Chris M. Hostetter
              Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: