amitjoy commented on a change in pull request #81:
URL: https://github.com/apache/felix-dev/pull/81#discussion_r674623250



##########
File path: 
scr/src/main/java/org/apache/felix/scr/impl/manager/ComponentContextImpl.java
##########
@@ -328,7 +328,7 @@ public void dispose()
 
     private Map<RefPair<?, ?>, Object> createNewFieldHandlerMap()
     {
-        return new TreeMap<>(
+        return new ConcurrentSkipListMap<>(

Review comment:
       @tjwatson According to the current implementation, 
`org.apache.felix.scr.impl.inject.field.FieldHandler.updateField(METHOD_TYPE, 
Object, BindParameters)` will be invoked by different implementations of 
`org.apache.felix.scr.impl.inject.field.FieldHandler.State.invoke(FieldHandler, 
METHOD_TYPE, Object, BindParameters)` and if we traverse back, none of the 
consumers of the aforementioned `invoke(..)` method is thread-safe 
(synchronized). I agree with you, we should introduce thread-safety in 
`org.apache.felix.scr.impl.inject.field.FieldHandler.updateField(METHOD_TYPE, 
Object, BindParameters)`.




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