Skip to content

Commit

Permalink
don't fail with NPE on absence of reference (instance)
Browse files Browse the repository at this point in the history
  • Loading branch information
dslmeinte committed Jul 3, 2019
1 parent eaac379 commit b4fd1f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mps-inspector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>nl.dslconsultancy.mps</groupId>
<artifactId>mps-inspector</artifactId>
<version>0.2.1</version>
<version>0.2.2</version>
<packaging>jar</packaging>

<name>MPS Inspector</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ fun NodeXml.theseChildren(featureDecl: MetaFeatureXml?): Iterable<NodeXml> =
if (featureDecl == null) emptyList() else children.filter { it.role == featureDecl.index }

fun NodeXml.thisReference(featureDecl: MetaFeatureXml?): ReferenceXml? =
if (featureDecl == null) null else references.filter { it.role == featureDecl.index }[0]
if (featureDecl == null) null else references.filter { it.role == featureDecl.index }.getOrNull(0)


// primarily intended for memoising: {@code memois.of(src to dst()).apply { ... }}
Expand Down

0 comments on commit b4fd1f3

Please sign in to comment.