Solr
  1. Solr
  2. SOLR-3357

Add Generics to ResourceLoader.newInstance

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0-ALPHA
    • Component/s: None
    • Labels:
      None

      Description

      Came out of LUCENE-2510.

      We can add generics to ResourceLoader.newInstance so it returns T instead of Object. This will add improved type safety and remove the need for casting the result to a specific type.

        Activity

        Hide
        Chris Male added a comment -

        Patch which adds generics to ResourceLoader.newInstance.

        As part of this effort, I've had to clean up a lot of missing generics, removing Object return types instead of actual typed returns.

        DIH wraps ResourceLoader.newInstance into its own newInstance like method which I've left untouched (using Object.class). It can be improved in a separate issue.

        Show
        Chris Male added a comment - Patch which adds generics to ResourceLoader.newInstance. As part of this effort, I've had to clean up a lot of missing generics, removing Object return types instead of actual typed returns. DIH wraps ResourceLoader.newInstance into its own newInstance like method which I've left untouched (using Object.class). It can be improved in a separate issue.
        Hide
        Uwe Schindler added a comment -

        String +1 from the policeman, you made my weekend!

        Show
        Uwe Schindler added a comment - String +1 from the policeman, you made my weekend!
        Hide
        Ryan McKinley added a comment -

        +1

        Show
        Ryan McKinley added a comment - +1
        Hide
        Chris Male added a comment -

        Fixed in trunk.

        Show
        Chris Male added a comment - Fixed in trunk.

          People

          • Assignee:
            Chris Male
            Reporter:
            Chris Male
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development