Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

Commit

Permalink
Fixes #129
Browse files Browse the repository at this point in the history
Only check for subcomponents that have error states as to whether they
are included in the composite state declaration.
  • Loading branch information
reteprelief committed Apr 13, 2017
1 parent 65e5a34 commit 532e2c3
Showing 1 changed file with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -691,14 +691,18 @@ protected void checkComponent(ComponentInstance componentInstance, AnalysisModel

for (ComponentInstance ci : componentInstance.getComponentInstances()) {
boolean found = false;
for (Subcomponent s : subcomponents) {
if (s == ci.getSubcomponent()) {
found = true;
if (EMV2Util.hasComponentErrorBehaviorStates(ci)) {
for (Subcomponent s : subcomponents) {
if (s == ci.getSubcomponent()) {
found = true;
}
}
if (!found) {
error(componentInstance,
"C12: component " + ci.getName() + " is not referenced for state "
+ EMV2Util.getPrintName(ebs) + " in component "
+ componentInstance.getName());
}
}
if (!found) {
error(componentInstance, "C12: component " + ci.getName() + " is not referenced for state "
+ EMV2Util.getPrintName(ebs) + " in component " + componentInstance.getName());
}
}
}
Expand Down

0 comments on commit 532e2c3

Please sign in to comment.