rmcdouga commented on PR #2: URL: https://github.com/apache/sling-org-apache-sling-testing-hamcrest/pull/2#issuecomment-1798778762
> Maybe you can just delegate to [FrameworkUtil.asMap()](https://github.com/apache/felix-dev/blob/6eda79100676b63c1221c2d87416b286f028f952/framework/src/main/java/org/osgi/framework/FrameworkUtil.java#L718) to cover the Dictionary case? I went back and looked into using FrameworkUtil. It would require adding another dependency (org.osgi.core is currently a test only dependency). I'm hesitant to add the dependency to accomodate what would inevitably be newly developed client code (old client code would generate the Stack Overflow, so we know there's no code out there today that passes in a custom Dictionary). My feeling is that we should not be facilitating the use of Dictionary in new code, so I don't feel bad if we force the developer to use FrameworkUtil to convert the Dictionary to a Map before passing the object into us. One last thing to keep in mind is that this only affects Dictionary objects that *do not* implement the Map interface. I'm not sure how many are in the OSGi framework, but the one implementation in the JDK (HashTable) does implement Map, so I think this is a rare case that I don't feel bad about requiring a little extra work on the developer. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org