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

Lock down NamedList API, remove inefficent and esoteric methods

    XMLWordPrintableJSON

Details

    • Task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 4.9, 6.0
    • None
    • None

    Description

      Over in SOLR-2288, rmuir made some good points about locking down the NamedList API to protect people...

      I looked at your patch, and personally I think NamedList should really be type-safe.
      If users want to use it in a type-unsafe way, thats fine, but the container itself shouldn't be List<Object>.

      ...

      Separately, i just want to say the following about NamedList:

      All uses of this API should really be reviewed. I'm quite aware that it warns you about the fact that its slow for certain operations,
      but in my opinion these slow operations such as get(String, int) should be deprecated and removed.

      Any users that are using NamedList in this way, especially in loops, are very likely using the wrong datastructure.

      (emphasis added by me)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              hossman Chris M. Hostetter
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: