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

Add Generics to ResourceLoader.newInstance

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: 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
        cmale 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
        cmale 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
        thetaphi Uwe Schindler added a comment -

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

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

        +1

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

        Fixed in trunk.

        Show
        cmale Chris Male added a comment - Fixed in trunk.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development