[ https://issues.apache.org/jira/browse/SLING-3505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14044794#comment-14044794 ]
Andrei Dulvac edited comment on SLING-3505 at 6/26/14 4:01 PM: --------------------------------------------------------------- [~asanso], OK, I debugged this and there is a null resource in MapEntries.java:291 if I trigger the method quasi-concurrently. I guess the event hadle is triggered before the resolver is able to resolve that path. can't tell you why, though. before, this wasn't working either, but now there's a NPE to show it too :( {code} private void doAddVanity(String path) { Resource resource = resolver.getResource(path); loadVanityPath(resource, resolveMapsMap, vanityTargets); } {code} I'll investigate this further if needed, but maybe you can spot the problem directly... was (Author: andrei.dulvac): OK, I debugged this and there is a null resource in MapEntries.java:291 if I trigger the method quasi-concurrently. I guess the event hadle is triggered before the resolver is able to resolve that path. can't tell you why, though. before, this wasn't working either, but now there's a NPE to show it too :( {code} private void doAddVanity(String path) { Resource resource = resolver.getResource(path); loadVanityPath(resource, resolveMapsMap, vanityTargets); } {code} > Improve handling of updates to mapping (alias, vanity path) > ----------------------------------------------------------- > > Key: SLING-3505 > URL: https://issues.apache.org/jira/browse/SLING-3505 > Project: Sling > Issue Type: Improvement > Components: ResourceResolver > Affects Versions: Resource Resolver 1.1.0 > Reporter: Carsten Ziegeler > Assignee: Antonio Sanso > Fix For: Resource Resolver 1.1.2 > > Attachments: MapEntry.java.rej, SLING-3505-patch.txt, > SLING-3505-patch2.txt, SLING-3505-patch2.txt, SLING-3505-patch3-je.txt, > SLING-3505-patch3.txt, SLING-3505-patch3.txt > > > The update handling for the mapping including aliases and vanity path is a > simple algorithm which simply updates the whole mapping. Especially with > large mapping info spread across the repository, a simple update of a single > property results in the whole mapping info to be recreated. > It would be great if this could be improved. > Right now, only the active mapping is hold in memory - as a change of a > single property might cause to activate a totally different mapping than the > one which was changed (e.h. when the ordering is changed), the update needs > to be more complex or more information needs to be hold in memory. > In addition there is more to consider, like if the vanity path info is > changed, only the new value is available - but the old is gone. -- This message was sent by Atlassian JIRA (v6.2#6252)