Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-7020

DefaultDistributionComponentProvider is causing an NPE when agents are listed

    XMLWordPrintableJSON

Details

    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)

      { componentList.addAll(componentMap.values()); }

      return componentList;
      }

      Attachments

        Activity

          People

            marett Timothee Maret
            andysch Andreas Schaefer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: