File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
plugins/package-managers/node/src/main/kotlin Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -185,16 +185,14 @@ private object AuthorListSerializer : JsonTransformingSerializer<List<Author>>(s
185185 when (this ) {
186186 is JsonObject -> listOf (this )
187187
188- is JsonPrimitive -> {
189- parseAuthorString(contentOrNull).mapNotNull { info ->
190- when {
191- info.name != null -> Author (checkNotNull(info.name), info.email, info.homepage)
192- info.email == null -> null
193- else -> Author (guessNameFromEmail(checkNotNull(info.email)), info.email, info.homepage)
194- }
195- }.map {
196- JSON .encodeToJsonElement(it)
188+ is JsonPrimitive -> parseAuthorString(contentOrNull).mapNotNull { info ->
189+ when {
190+ info.name != null -> Author (checkNotNull(info.name), info.email, info.homepage)
191+ info.email == null -> null
192+ else -> Author (guessNameFromEmail(checkNotNull(info.email)), info.email, info.homepage)
197193 }
194+ }.map {
195+ JSON .encodeToJsonElement(it)
198196 }
199197
200198 else -> throw SerializationException (" Unexpected JSON element." )
You can’t perform that action at this time.
0 commit comments