diff --git a/bundles/org.eclipse.passage.lic.base/src/org/eclipse/passage/lic/base/FeatureFilter.java b/bundles/org.eclipse.passage.lic.base/src/org/eclipse/passage/lic/base/FeatureFilter.java index 70eab34c7..24e1d310c 100644 --- a/bundles/org.eclipse.passage.lic.base/src/org/eclipse/passage/lic/base/FeatureFilter.java +++ b/bundles/org.eclipse.passage.lic.base/src/org/eclipse/passage/lic/base/FeatureFilter.java @@ -14,6 +14,7 @@ import java.util.Collection; import java.util.Collections; +import java.util.LinkedHashSet; import java.util.Optional; import java.util.function.BiFunction; import java.util.function.Function; @@ -56,7 +57,7 @@ private Collection filter(Collection targets) { .map(target -> map.apply(target, feature))// .filter(Optional::isPresent) // .map(Optional::get) // - .collect(Collectors.toSet()); + .collect(Collectors.toCollection(LinkedHashSet::new)); } } diff --git a/bundles/org.eclipse.passage.lic.base/src/org/eclipse/passage/lic/base/conditions/FeatureConditionPack.java b/bundles/org.eclipse.passage.lic.base/src/org/eclipse/passage/lic/base/conditions/FeatureConditionPack.java index d38f621b8..d0bb2b829 100644 --- a/bundles/org.eclipse.passage.lic.base/src/org/eclipse/passage/lic/base/conditions/FeatureConditionPack.java +++ b/bundles/org.eclipse.passage.lic.base/src/org/eclipse/passage/lic/base/conditions/FeatureConditionPack.java @@ -13,6 +13,7 @@ package org.eclipse.passage.lic.base.conditions; import java.util.Collection; +import java.util.LinkedHashSet; import java.util.Objects; import java.util.stream.Collectors; @@ -49,7 +50,7 @@ public Collection conditions() { // FIXME: work for CachingFunction return parent.conditions().stream()// .filter(condition -> condition.feature().equals(feature))// - .collect(Collectors.toSet()); + .collect(Collectors.toCollection(LinkedHashSet::new)); } @Override