Skip to content

Commit 08a3817

Browse files
kezhenxu94wuseal
authored andcommitted
Polish code and remove deprecated plugin.id (#155)
1 parent d761f06 commit 08a3817

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

build.gradle

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ version '3.1.0-EAP'
2525
intellij {
2626
version '2017.1'
2727
pluginName 'JsonToKotlinClass'
28-
29-
publish {
30-
pluginId '9960'
31-
}
3228
}
3329

3430
patchPluginXml {

src/main/kotlin/extensions/Extension.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ abstract class Extension : IImportClassDeclarationInterceptor, IKotlinDataClassI
4040
return configs[key]?.asString ?: ""
4141
}
4242

43-
override fun intercept(originImportClasses: String): String {
44-
return originImportClasses
43+
override fun intercept(originClassImportDeclaration: String): String {
44+
return originClassImportDeclaration
4545
}
4646

4747
fun getTestHelper() = TestHelper(this)
@@ -59,4 +59,4 @@ abstract class Extension : IImportClassDeclarationInterceptor, IKotlinDataClassI
5959
return getConfig(key)
6060
}
6161
}
62-
}
62+
}

src/main/kotlin/wu/seal/jsontokotlin/utils/classblockparse/ClassCodeParser.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,21 +119,21 @@ class ClassCodeParser(private val classBlockString: String) {
119119
val noAnnotationString = stringBeforeLastColonWithoutComment.substringAfterLast(")").trim()
120120
val splits = noAnnotationString.split(" ")
121121
val propertyName =
122-
splits.filterIndexed { index, s -> listOf(0).contains(index).not() }
122+
splits.filterIndexed { index, _ -> listOf(0).contains(index).not() }
123123
.joinToString(" ")
124124
propertyName
125125
}
126126
stringBeforeLastColonWithoutComment.contains("@") -> {
127127
val splits = stringBeforeLastColonWithoutComment.split(" ")
128128
val propertyName =
129-
splits.filterIndexed { index, s -> listOf(0, 1).contains(index).not() }
129+
splits.filterIndexed { index, _ -> listOf(0, 1).contains(index).not() }
130130
.joinToString(" ")
131131
propertyName
132132
}
133133
else -> {
134134
val splits = stringBeforeLastColonWithoutComment.split(" ")
135135
val propertyName =
136-
splits.filterIndexed { index, s -> listOf(0).contains(index).not() }
136+
splits.filterIndexed { index, _ -> listOf(0).contains(index).not() }
137137
.joinToString(" ")
138138
propertyName
139139
}

0 commit comments

Comments
 (0)