You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by GitBox <gi...@apache.org> on 2020/04/21 19:22:37 UTC

[GitHub] [felix-dev] glimmerveen commented on a change in pull request #19: [FELIX-6161] Replace local filtering of references in favour of relying on filtered ServiceListener callbacks

glimmerveen commented on a change in pull request #19:
URL: https://github.com/apache/felix-dev/pull/19#discussion_r412428375



##########
File path: scr/src/main/java/org/apache/felix/scr/impl/BundleComponentActivator.java
##########
@@ -98,133 +98,82 @@
 
     private static class ListenerInfo implements ServiceListener
     {
-        private Map<Filter, List<ExtendedServiceListener<ExtendedServiceEvent>>> filterMap = new HashMap<>();
+        List<ExtendedServiceListener<ExtendedServiceEvent>> listeners = new ArrayList<>();

Review comment:
       It has been a while I made these changes, so I am not too sure, but I believe I mimicked the current approach, but with a List rather than a Map. Looking at the places where the list is modified, it looks similar to what a CopyOnWriteArrayList would do.
   
   I don't mind changing it, though I am not familiar with possible additional reasons why it was done in this way.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org