mihaibudiu commented on code in PR #3567:
URL: https://github.com/apache/calcite/pull/3567#discussion_r1418252677


##########
core/src/main/java/org/apache/calcite/util/ReflectUtil.java:
##########
@@ -450,7 +450,8 @@ E extends Object> ReflectiveVisitDispatcher<R, E> 
createDispatcher(
         Method method = map.get(key);
         if (method == null) {
           if (map.containsKey(key)) {
-            // We already looked for the method and found nothing.
+            // We should get again because it may be putted an object by 
another thread.

Review Comment:
   I don't really understand where the threads come from, so I have no idea how 
to do this.
   If all it takes is to make this method synchronized (or some other one), it 
looks more principled.
   If you think this works always, I say it's fine.



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