Code cleanup: get rid of unnecessary !! / ?. / as

This commit is contained in:
Mikhail Glukhikh
2015-11-11 15:50:24 +03:00
parent 7e8e4e9e1b
commit 2f4dbd2084
21 changed files with 33 additions and 33 deletions
@@ -35,7 +35,7 @@ class AndroidXmlHandler(private val elementCallback: (String, String) -> Unit) :
val attributesMap = attributes.toMap()
val idAttribute = attributesMap[AndroidConst.ID_ATTRIBUTE_NO_NAMESPACE]
val widgetType = attributesMap[AndroidConst.CLASS_ATTRIBUTE_NO_NAMESPACE] ?: localName
val name = idAttribute?.let { idToName(idAttribute!!) }
val name = idAttribute?.let { idToName(idAttribute) }
if (name != null) elementCallback(name, widgetType)
}