Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-11029

OSGiServiceInjector.getService() should rely on framework

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • Models Implementation 1.5.0
    • None
    • Sling Models
    • None

    Description

      Looking at https://github.com/apache/sling-org-apache-sling-models-impl/blob/master/src/main/java/org/apache/sling/models/impl/injectors/OSGiServiceInjector.java#L102 it seems to get all service references, sort them and then uses the one with the highest ranking.
      However BundleContext#getServiceReference() does exactly that, so it can be directly used

      Attachments

        Issue Links

          Activity

            People

              joerghoh Joerg Hoh
              cziegeler Carsten Ziegeler
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m