DefaultAsserter object. Add function to replace constructor invoke.
This commit is contained in:
committed by
Pavel Punegov
parent
ac0f612781
commit
1c4ecd287d
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user