Skip to content

Commit

Permalink
Fix quality flaw: use immutable List instead of mutable List (#401)
Browse files Browse the repository at this point in the history
  • Loading branch information
erwan-serandour-sonarsource committed Dec 13, 2023
1 parent 7f85757 commit 5be4aaf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class CipherModeOperationCheck : CallAbstractCheck() {
}
}

private fun generateSecondaryLocations(secondaries: MutableList<PsiElement>, kotlinFileContext: KotlinFileContext) =
private fun generateSecondaryLocations(secondaries: List<PsiElement>, kotlinFileContext: KotlinFileContext) =
secondaries.mapIndexed { i, secondary ->
if (i < secondaries.size - 1) {
SecondaryLocation(kotlinFileContext.textRange(secondary), "Initialization vector is configured here.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ private fun findParameter(
private fun checkDotExpression(
expression: KtExpression?,
klassParameter: KtParameter,
methodParameters: MutableList<KtParameter>,
methodParameters: List<KtParameter>,
): Boolean =
if (expression is KtDotQualifiedExpression) {
((expression.receiverExpression as KtNameReferenceExpression).getReferencedName() == methodParameters[0].name
Expand Down

0 comments on commit 5be4aaf

Please sign in to comment.