Skip to content

Commit 03f1823

Browse files
committed
refactor: use a named parameter when calling equals with ignoreCase
1 parent cd175cc commit 03f1823

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/main/kotlin/com/github/lppedd/cc/api/impl/InternalCommitTokenProvider.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ internal class InternalCommitTokenProvider(private val project: Project) :
6060
scope: String?,
6161
subject: String?,
6262
): Collection<CommitFooterValue> {
63-
if ("co-authored-by".equals(footerType, true)) {
63+
if ("co-authored-by".equals(footerType, ignoreCase = true)) {
6464
return tokensService.getCoAuthors()
6565
.take(3)
6666
.map { DefaultCommitToken(it, "", true) }

src/main/kotlin/com/github/lppedd/cc/completion/providers/FooterValueCompletionProvider.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ internal class FooterValueCompletionProvider(
6565
prefixedResultSet.addElement(element)
6666
}
6767

68-
if ("co-authored-by".equals(context.type, true)) {
68+
if ("co-authored-by".equals(context.type, ignoreCase = true)) {
6969
val element = ShowMoreCoAuthorsLookupElement(project, prefix)
7070
element.putUserData(LookupElementKey.Index, Int.MAX_VALUE)
7171

src/main/kotlin/com/github/lppedd/cc/configuration/component/CoAuthorsFilePickerPanel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ internal class CoAuthorsFilePickerPanel(
157157
override val okActionName = CCBundle["cc.config.fileDialog.selectFile"]
158158
override val validFileIcon = CC.Icon.FileType.CoAuthors
159159
override val validFileTest: (VirtualFile) -> Boolean = {
160-
it.isValid && !it.isDirectory && it.isWritable && "coauthors".equals(it.extension, true)
160+
it.isValid && !it.isDirectory && it.isWritable && "coauthors".equals(it.extension, ignoreCase = true)
161161
}
162162

163163
init {

src/main/kotlin/com/github/lppedd/cc/configuration/component/DefaultTokensFilePickerPanel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ internal class DefaultTokensFilePickerPanel(
192192
override val okActionName = CCBundle["cc.config.fileDialog.selectFile"]
193193
override val validFileIcon = CC.Icon.FileType.Json
194194
override val validFileTest: (VirtualFile) -> Boolean = {
195-
it.isValid && "json".equals(it.extension, true)
195+
it.isValid && "json".equals(it.extension, ignoreCase = true)
196196
}
197197

198198
init {

src/main/kotlin/com/github/lppedd/cc/vcs/VcsCommitTokenProvider.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ internal class VcsCommitTokenProvider(project: Project) :
117117
.map { it.replace(regexBeginEndWs, "") }
118118
.filterNotBlank()
119119
.map(CCParser::parseFooter)
120-
.filter { it.type is ValidToken && (footerType == null || it.type.value.equals(footerType, true)) }
120+
.filter { it.type is ValidToken && (footerType == null || it.type.value.equals(footerType, ignoreCase = true)) }
121121
.map(FooterTokens::footer)
122122
.filterIsInstance<ValidToken>()
123123
.map(ValidToken::value)

0 commit comments

Comments
 (0)