Details

    • Sub-task
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 2.25.05
    • None
    • None

    Description

      In the method below it seems to me that variantsSet.addAll(child.getParameterPrefixes()); below the child.populateVariants(); can be removed as due to child.populateVariants(); already the lower if (!getParameterPrefixes().isEmpty())

      { variantsSet.addAll(getParameterPrefixes()); } gets invoked

      Ard

      protected void populateVariants() {
      // first traverse the children
      Set<String> variantsSet = new HashSet<String>();
      for (HstComponentConfigurationService child : orderedListConfigs) { child.populateVariants(); variantsSet.addAll(child.getParameterPrefixes()); variantsSet.addAll(child.getVariants()); }
      // add parameter prefixes of component itself (not child)
      if (!getParameterPrefixes().isEmpty()) { variantsSet.addAll(getParameterPrefixes()); }

      if (!variantsSet.isEmpty())

      { // set variants to unmodifiable list this.variants = Collections.unmodifiableList(new ArrayList<String>(variantsSet)); }

      }

      Attachments

        Activity

          People

            svoortman Simon Voortman (Inactive)
            aschrijvers Ard Schrijvers
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: