Check nullability
This commit is contained in:
@@ -12,7 +12,7 @@ class ConstantLookup(private val prefix: String, private val lookup29: Array<out
|
|||||||
private val lookup by lazy {
|
private val lookup by lazy {
|
||||||
SparseArrayCompat<String>().apply {
|
SparseArrayCompat<String>().apply {
|
||||||
for (field in clazz().declaredFields) try {
|
for (field in clazz().declaredFields) try {
|
||||||
if (field.type == Int::class.java && field.name.startsWith(prefix)) put(field.getInt(null), field.name)
|
if (field?.type == Int::class.java && field.name.startsWith(prefix)) put(field.getInt(null), field.name)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Timber.w(e)
|
Timber.w(e)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user