Skip to content
Snippets Groups Projects
Commit 44d544b4 authored by Johannes Mey's avatar Johannes Mey
Browse files

fix SwitchMonitoredInject. It now only removes the intrinsic reference and no...

fix SwitchMonitoredInject. It now only removes the intrinsic reference and no longer the switch itself.
parent 88748df4
No related branches found
No related tags found
No related merge requests found
......@@ -23,21 +23,8 @@ public class JastaddTransformationInjectSwitchMonitored<TJastaddDriver extends J
java.util.List<TrackElement> refsToBeRemoved = new ArrayList<>();
for (final JastaddSwitchMonitoredInjectMatch match : matches) {
for (final Sensor sensor : match.getSw().getMonitoringSensorList()) {
for (TrackElement trackElement : sensor.getMonitoredElementList()) {
if (trackElement == match.getSw()) {
refsToBeRemoved.add(trackElement);
}
}
}
match.getSw().getMonitoringSensorList().clear();
}
for(TrackElement ref : refsToBeRemoved) {
ref.removeSelf();
}
driver.flushCache();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment