Skip to content

Commit

Permalink
fix virtual model based view to avoid nullpointer exception when acce…
Browse files Browse the repository at this point in the history
…ssing resources
  • Loading branch information
Jan Wittler committed Nov 24, 2022
1 parent 2add054 commit 6e19f80
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package tools.vitruv.framework.vsum.internal;

import static com.google.common.base.Preconditions.checkState;
import static edu.kit.ipd.sdq.commons.util.org.eclipse.emf.ecore.resource.ResourceSetUtil.getOrCreateResource;
import static edu.kit.ipd.sdq.commons.util.org.eclipse.emf.ecore.resource.ResourceSetUtil.loadOrCreateResource;
import static edu.kit.ipd.sdq.commons.util.org.eclipse.emf.ecore.resource.ResourceSetUtil.withGlobalFactories;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class DefaultVirtualModelBasedTestView implements VirtualModelBasedTestView, Non

private def NonTransactionalTestView generateTestView(Path testProjectPath, TestUserInteraction userInteraction) {
new ChangePublishingTestView(testProjectPath, userInteraction, this.uriMode, virtualModel,
virtualModel.uuidResolver)[virtualModel.getModelInstance(it).resource]
virtualModel.uuidResolver)[virtualModel.getModelInstance(it)?.resource]
}

override getVirtualModel() {
Expand Down

0 comments on commit 6e19f80

Please sign in to comment.