|
|
|
Steps to repro this? Did we ever figure out what criteria caused this behaviour to occur?
I have not yet been able to make this occur in the latest drop, but I'd like to know a little more about what may or may not have caused it, if that has been determined. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
It looks like the map of resource containers does not have all of them, so a query by uuid fails and returns null.
As a band aid, we could test for null-ness and log a warning otherwise.
for (String uuid : mapForIterating.keySet()) {
if (!allUuids.contains(uuid)) {
ResourceContainer resourceContainer = this.resourceContainers.get(uuid);
if (resourceContainer != null) { /// <<-----
Resource resource = resourceContainer.getResource();
// Only purge stuff that was synchronized at some point. Other stuff may just be newly discovered.
if (resource.getId() != 0) {
removeResource(resource.getId());
removedResources++;
}
} else {
log.warn(" no container found for uuid : " + uuid );
}
}
}