annotations for java.util.ServiceLoader

remove some unnecessary !! from stdlib
This commit is contained in:
Alex Tkachman
2012-09-27 06:43:13 +02:00
parent 804e3769ff
commit 1b37f13a34
2 changed files with 24 additions and 2 deletions
+2 -2
View File
@@ -16,8 +16,8 @@ public var asserter: Asserter
get() {
if (_asserter == null) {
val klass = javaClass<Asserter>()
val loader = ServiceLoader.load(klass)!!
for (a in loader.iterator()!!) {
val loader = ServiceLoader.load(klass)
for (a in loader.iterator()) {
if (a != null) {
_asserter = a
break