Compiler&plugin deprecations cleanup: *array -> *arrayOf, copyToArray -> toTypedArray.
This commit is contained in:
+2
-2
@@ -60,7 +60,7 @@ class AndroidFindMemberUsagesHandler(
|
||||
|
||||
val psiElements = parser?.resourceManager?.propertyToXmlAttributes(property)
|
||||
val valueElements = psiElements?.map { (it as? XmlAttribute)?.getValueElement() as? PsiElement }?.filterNotNull()
|
||||
if (valueElements != null && valueElements.isNotEmpty()) return valueElements.copyToArray()
|
||||
if (valueElements != null && valueElements.isNotEmpty()) return valueElements.toTypedArray()
|
||||
|
||||
return super.getPrimaryElements()
|
||||
}
|
||||
@@ -89,7 +89,7 @@ class AndroidFindMemberUsagesHandler(
|
||||
}
|
||||
}
|
||||
|
||||
if (res.isNotEmpty()) return res.copyToArray()
|
||||
if (res.isNotEmpty()) return res.toTypedArray()
|
||||
|
||||
return super.getSecondaryElements()
|
||||
}
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ public class AndroidGotoDeclarationHandler : GotoDeclarationHandler {
|
||||
val parser = ModuleServiceManager.getService(moduleInfo.module, javaClass<AndroidUIXmlProcessor>())
|
||||
val psiElements = parser.resourceManager.propertyToXmlAttributes(property)
|
||||
val valueElements = psiElements.map { (it as? XmlAttribute)?.getValueElement() as? PsiElement }.filterNotNull()
|
||||
if (valueElements.isNotEmpty()) return valueElements.copyToArray()
|
||||
if (valueElements.isNotEmpty()) return valueElements.toTypedArray()
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user