Details
-
Sub-task
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
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 invokedArd
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)); }}