Skip to content

Commit

Permalink
Merge pull request #595 from vitruv-tools/end-transaction-uuid
Browse files Browse the repository at this point in the history
Fix incorrect transaction management in `ResourceRepositoryImpl`
  • Loading branch information
JanWittler authored Jul 12, 2023
2 parents 006fa78 + ee1240c commit 49c3748
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class ResourceRepositoryImpl implements ModelRepository {
private final ResourceSet modelsResourceSet = withGlobalFactories(new ResourceSetImpl());
private final Map<URI, ModelInstance> modelInstances = new HashMap<>();
private final PersistableCorrespondenceModel correspondenceModel;
private final UuidResolver uuidResolver = UuidResolver.create(modelsResourceSet);
private UuidResolver uuidResolver = UuidResolver.create(modelsResourceSet);
private final ChangeRecorder changeRecorder = new ChangeRecorder(modelsResourceSet);
private final VitruviusChangeResolver<Uuid> changeResolver = VitruviusChangeResolver.forUuids(uuidResolver);

Expand Down Expand Up @@ -210,6 +210,6 @@ public void close() {
changeRecorder.close();
modelsResourceSet.getResources().forEach(Resource::unload);
modelsResourceSet.getResources().clear();
uuidResolver.endTransaction();
uuidResolver = null;
}
}

0 comments on commit 49c3748

Please sign in to comment.