Skip to content

Commit 5be4aaf

Browse files
Fix quality flaw: use immutable List instead of mutable List (#401)
1 parent 7f85757 commit 5be4aaf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

sonar-kotlin-checks/src/main/java/org/sonarsource/kotlin/checks/CipherModeOperationCheck.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class CipherModeOperationCheck : CallAbstractCheck() {
7878
}
7979
}
8080

81-
private fun generateSecondaryLocations(secondaries: MutableList<PsiElement>, kotlinFileContext: KotlinFileContext) =
81+
private fun generateSecondaryLocations(secondaries: List<PsiElement>, kotlinFileContext: KotlinFileContext) =
8282
secondaries.mapIndexed { i, secondary ->
8383
if (i < secondaries.size - 1) {
8484
SecondaryLocation(kotlinFileContext.textRange(secondary), "Initialization vector is configured here.")

sonar-kotlin-checks/src/main/java/org/sonarsource/kotlin/checks/RedundantMethodsInDataClassesCheck.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ private fun findParameter(
206206
private fun checkDotExpression(
207207
expression: KtExpression?,
208208
klassParameter: KtParameter,
209-
methodParameters: MutableList<KtParameter>,
209+
methodParameters: List<KtParameter>,
210210
): Boolean =
211211
if (expression is KtDotQualifiedExpression) {
212212
((expression.receiverExpression as KtNameReferenceExpression).getReferencedName() == methodParameters[0].name

0 commit comments

Comments
 (0)