KT.ARRAY_PRIMITIVE
Using 'Array' primitive type
Using Array leads to implicit boxing and performance hit. Prefer using Kotlin specialized Array Instances. As stated in the Kotlin documentation Kotlin has specialized arrays to represent primitive types without boxing overhead, such as IntArray, ByteArray and so on.
Noncompliant Code
Copy
fun function(array: Array<Int>) { }
fun returningFunction(): Array<Double> { }
Compliant Code
Copy
fun function(array: IntArray) { }
fun returningFunction(): DoubleArray { }