Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-97535

Update type parameter for ModelIndexerWriterContributor field in DLFileEntrySearchRegistrar

    Details

      Description

      DLFileEntrySearchRegistrar has the following code:

      	@Reference(
      		target = "(indexer.class.name=com.liferay.document.library.kernel.model.DLFileEntry)"
      	)
      	protected ModelIndexerWriterContributor<DLFolder>
      		modelIndexWriterContributor;
      

      It's not causing any issues, because generics apply to compile time only (due to Type Erasure) and syntactically it's correct, while at runtime this information is lost and the "target" property ensures it'll get the right contributor (DLFileEntryModelIndexerWriterContributor).

      Still, we should update it to <DLFileEntry> because it's misleading.

      Actual:

      	protected ModelIndexerWriterContributor<DLFolder>
      		modelIndexWriterContributor;
      

      Expected:

      	protected ModelIndexerWriterContributor<DLFileEntry>
      		modelIndexWriterContributor;
      

        Attachments

          Activity

            People

            • Assignee:
              brian.chan Brian Chan
              Reporter:
              tibor.lipusz Tibor Lipusz
              Recent user:
              Jason Pince
              Participants of an Issue:
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved:

                Packages

                Version Package
                7.1.X
                7.2.X
                7.2.1 CE GA2
                Master