- public LinkedHashSet<FeatureConfigSnapshotHolder> getFeatureConfigSnapshotHolders() throws Exception {
- LinkedHashSet <FeatureConfigSnapshotHolder> snapShotHolders = new LinkedHashSet<FeatureConfigSnapshotHolder>();
- for(ChildAwareFeatureWrapper c: getChildFeatures()) {
- for(FeatureConfigSnapshotHolder h: c.getFeatureConfigSnapshotHolders()) {
- FeatureConfigSnapshotHolder f;
- try {
- f = new FeatureConfigSnapshotHolder(h,this);
- snapShotHolders.add(f);
- } catch (JAXBException e) {
- LOG.debug("{} is not a config subsystem config file",h.getFileInfo().getFinalname());
+ @Override
+ public Set<FeatureConfigSnapshotHolder> getFeatureConfigSnapshotHolders() throws Exception {
+ Set<FeatureConfigSnapshotHolder> snapShotHolders = new LinkedHashSet<>();
+ for (ChildAwareFeatureWrapper c : getChildFeatures()) {
+ for (FeatureConfigSnapshotHolder h : c.getFeatureConfigSnapshotHolders()) {
+ final Optional<FeatureConfigSnapshotHolder> featureConfigSnapshotHolder =
+ getFeatureConfigSnapshotHolder(h.getFileInfo());
+ if (featureConfigSnapshotHolder.isPresent()) {
+ snapShotHolders.add(featureConfigSnapshotHolder.get());