| Summary: | [builder] built resources registered twice with ResourceDescriptionsData | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Knut Wannheden <knut.wannheden> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | sebastian.zarnekow |
| Version: | 2.0.0 | Flags: | sebastian.zarnekow:
indigo+
|
| Target Milestone: | SR1 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
Pushed to master. Closing all bugs that were set to RESOLVED before Neon.0 Closing all bugs that were set to RESOLVED before Neon.0 |
In the following piece of code from ClusteringBuilderState#doUpdate() the newDelta is registered with the newState and then also directly removed from / added to the newData. The latter is however already done in CurrentDescriptions#register() (i.e. in the call newState.register(newDelta)). So it seems like those lines could be removed. I.e. replace: if (newDelta != null) { newDeltas.add(newDelta); if (newDelta.haveEObjectDescriptionsChanged()) changedDeltas.add(newDelta); // Make the new resource description known and update the map. newState.register(newDelta); if (newDelta.getNew() == null) { newData.removeDescription(changedURI); } else { newData.addDescription(changedURI, newDelta.getNew()); } } with: if (newDelta != null) { newDeltas.add(newDelta); if (newDelta.haveEObjectDescriptionsChanged()) changedDeltas.add(newDelta); // Make the new resource description known and update the map. newState.register(newDelta); }