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

OSGi Mocks MockConfigurationAdmin: implement listConfigurations(<Filter>), add missing throws definitions

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Testing OSGi Mock 3.0.0
    • Testing OSGi Mock 3.1.0
    • Testing
    • None

    Description

      ConfigurationAdmin specifies a listConfigurations-method, which can throw IOException and InvalidSyntaxException. However, the MockConfigurationAdmin implementation does not define them.

      While this is technically allowed an OK (builds succeed), it poses a problem when trying to do mocking and/or spying on such objects: In my use-case I needed to provide an implementation for the listConfigurations-method, for which MockConfigurationAdmin is throwing an UnsupportedOperationException.

      I think it is maybe a good idea to also implement some of the other methods, also.

      Attachments

        Activity

          People

            sseifert Stefan Seifert
            Henry Kuijpers Henry Kuijpers
            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 - 50m
                50m