kwin commented on code in PR #1015:
URL: https://github.com/apache/jackrabbit-oak/pull/1015#discussion_r1276243477


##########
oak-core-spi/src/main/java/org/apache/jackrabbit/oak/osgi/OsgiWhiteboard.java:
##########
@@ -69,13 +69,13 @@ public <T> Registration register(
         Objects.requireNonNull(properties);
         checkArgument(type.isInstance(service));
 
-        Dictionary<Object, Object> dictionary = new Hashtable<Object, 
Object>();
+        Dictionary<String, Object> dictionary = new Hashtable<>();
         for (Map.Entry<?, ?> entry : properties.entrySet()) {
-            dictionary.put(entry.getKey(), entry.getValue());
+            dictionary.put((String)entry.getKey(), entry.getValue());

Review Comment:
   @reschke Is changing this SPI method signature ok to only accept Map<String, 
?> because that is the only one OSGi accepts (see 
https://docs.osgi.org/javadoc/r4v43/core/org/osgi/framework/BundleContext.html#registerService(java.lang.Class,%20S,%20java.util.Dictionary)
 or do we need to maintain backwards compatibility here as well?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to