DefaultAsserter object. Add function to replace constructor invoke.

This commit is contained in:
Pavel Punegov
2018-12-17 19:26:06 +03:00
committed by Pavel Punegov
parent ac0f612781
commit 1c4ecd287d
4 changed files with 11 additions and 13 deletions
@@ -9,12 +9,10 @@ import java.util.ServiceLoader
private val contributors = ServiceLoader.load(AsserterContributor::class.java).toList()
private val defaultAsserter = DefaultAsserter()
internal actual fun lookupAsserter(): Asserter {
for (contributor in contributors) {
val asserter = contributor.contribute()
if (asserter != null) return asserter
}
return defaultAsserter
return DefaultAsserter
}