diff options
Diffstat (limited to 'language-to-store/src')
-rw-r--r-- | language-to-store/src/main/java/tools/refinery/language/mapping/PartialModelMapper.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/language-to-store/src/main/java/tools/refinery/language/mapping/PartialModelMapper.java b/language-to-store/src/main/java/tools/refinery/language/mapping/PartialModelMapper.java index 9a4d0aa7..ba32921a 100644 --- a/language-to-store/src/main/java/tools/refinery/language/mapping/PartialModelMapper.java +++ b/language-to-store/src/main/java/tools/refinery/language/mapping/PartialModelMapper.java | |||
@@ -128,12 +128,10 @@ public class PartialModelMapper { | |||
128 | //Searches for and gives back a relation in a PartialModelMapperDTO | 128 | //Searches for and gives back a relation in a PartialModelMapperDTO |
129 | private tools.refinery.language.model.problem.Relation findingRelationInDTO(PartialModelMapperDTO partialModelMapperDTO, String searchedRelation, String errorText) | 129 | private tools.refinery.language.model.problem.Relation findingRelationInDTO(PartialModelMapperDTO partialModelMapperDTO, String searchedRelation, String errorText) |
130 | throws PartialModelMapperException { | 130 | throws PartialModelMapperException { |
131 | tools.refinery.language.model.problem.Relation relation = null; | ||
132 | for (tools.refinery.language.model.problem.Relation r : partialModelMapperDTO.getRelationMap().keySet()) { | 131 | for (tools.refinery.language.model.problem.Relation r : partialModelMapperDTO.getRelationMap().keySet()) { |
133 | if (r.getName().equals(searchedRelation)) relation = r; | 132 | if (searchedRelation.equals(r.getName())) return r; |
134 | } | 133 | } |
135 | if(relation == null) throw new PartialModelMapperException(errorText); | 134 | throw new PartialModelMapperException(errorText); |
136 | return relation; | ||
137 | } | 135 | } |
138 | 136 | ||
139 | //Processing assertions and placing them in the model | 137 | //Processing assertions and placing them in the model |