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

Define ResourceChange.ChangeType also as constant string values

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • API 2.23.0
    • API
    • None

    Description

      As all annotation values have to be provided as constants (e.g. in https://docs.osgi.org/javadoc/r6/residential/org/osgi/service/component/annotations/Component.html#property()) and conversion from Enum to String cannot be resolved at compile time all enum values of ResourceChange.ChangeType should also be provided as String constants.

      Something like this does not work

      @Component(property = { ResourceChangeListener.CHANGES+"="+ResourceChange.ChangeType.REMOVED.toString()}
      )
      

      Compare with https://stackoverflow.com/a/13253879.

      Attachments

        Issue Links

          Activity

            People

              kwin Konrad Windszus
              kwin Konrad Windszus
              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 - 2h 10m
                  2h 10m