rombert commented on issue #8: SLING-7544 Make optimized alias lookup 
non-blocking
URL: 
https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/8#issuecomment-398396306
 
 
   @DominikSuess - I am curious to understand why the `assertNull` is there. 
The flow is basically the following:
   
   - initialize map entries (`mapEntries.doInit()`)
   - assert that the entries are not initialized yet
   - add a map entry (`addResource.invoke(mapEntries`...)
   - validate that the map entries contain no alias map for the parent resource 
of the one just added before
   
   I'm curious why you added the null check (last step). Does this break 
anything if we get mappings returned this early? Note that the checks are racy 
- the test seems to assume that the `aliasMap` is not initialized but this may 
not be true due to the async nature.
   
   Obviously this can also be a bug in my refactoring, so I'm eager to 
understand the reason behind this check.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to