From 3693baa4f2bba4ff85a38a342b4d86f18e7c990f Mon Sep 17 00:00:00 2001 From: Antoine Neveux a183276 Date: Wed, 26 Oct 2016 19:16:12 +0200 Subject: [PATCH] Ensuring non null calls on some helper methods. --- .../main/kotlin/com/github/ktoolz/filefinder/parser/Parser.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/kotlin/com/github/ktoolz/filefinder/parser/Parser.kt b/core/src/main/kotlin/com/github/ktoolz/filefinder/parser/Parser.kt index 59aa645..f48bb99 100644 --- a/core/src/main/kotlin/com/github/ktoolz/filefinder/parser/Parser.kt +++ b/core/src/main/kotlin/com/github/ktoolz/filefinder/parser/Parser.kt @@ -16,8 +16,8 @@ import com.github.ktoolz.filefinder.model.BangQuery import com.github.ktoolz.filefinder.model.SearchQuery import javaslang.collection.List -fun List.names() = this.map { it.name } -fun List.findBang(name: String) = this.find { it.name.equals(name) }.get() +fun List.names() = this.map { it.name }!! +fun List.findBang(name: String) = this.find { it.name == name }.get()!! class ContextParser(val bangsReferences: List, val bangsIdentifier: Char = '!',