Skip to content

Commit

Permalink
PDE required-by query must check that import-type corresponds to mode…
Browse files Browse the repository at this point in the history
…l type (#80)
  • Loading branch information
briandealwis authored Oct 24, 2017
1 parent 14b4fa0 commit b19e34a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -372,14 +372,16 @@ public Collection<IFeatureModel> getFeaturesRequiring(IModel source) {
verifyModelCaches();
String sourceId = getId(source);
if(sourceId == null) { return Collections.emptyList(); }
boolean sourceIsFeature = source instanceof IFeatureModel;
Collection<IFeatureModel> results = new ArrayList<IFeatureModel>();
for(IFeatureModel featureModel : features.values()) {
if(!featureModel.isValid()) {
continue;
}
IFeature feature = featureModel.getFeature();
for(IFeatureImport p : feature.getImports()) {
if(sourceId.equals(p.getId())) {
boolean importIsFeature = p.getType() == IFeatureImport.FEATURE;
if (sourceId.equals(p.getId()) && importIsFeature == sourceIsFeature) {
results.add(featureModel);
break;
}
Expand Down

0 comments on commit b19e34a

Please sign in to comment.