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

        Chris Male created issue -
        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.
        Chris Male made changes -
        Field Original Value New Value
        Attachment SOLR-3357.patch [ 12522560 ]
        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.
        Chris Male made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Chris Male [ cmale ]
        Fix Version/s 4.0 [ 12314992 ]
        Resolution Fixed [ 1 ]
        Uwe Schindler made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        3d 14h 33m 1 Chris Male 17/Apr/12 02:06
        Resolved Resolved Closed Closed
        388d 8h 32m 1 Uwe Schindler 10/May/13 10:39

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development