Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
Latest Sling, JDK 1.8
Description
When listing the agents with ' /libs/sling/distribution/services.1.json' then the DefaultDistributionComponentProvider.getComponents() throws an NPE on line 84. The reason is that the method getComponentMap() for type TRIGGER is returning NULL and there is no check for a NPE. This will fix that NPE:
public List<DistributionComponent<?>> getComponents(DistributionComponentKind kind) {
Map<String, DistributionComponent<?>> componentMap = getComponentMap(kind.asClass());
List<DistributionComponent<?>> componentList = new ArrayList<DistributionComponent<?>>();
if(componentMap != null)
return componentList;
}