Skip to content

Commit

Permalink
nestedClasses -> sealedSubclasses
Browse files Browse the repository at this point in the history
  • Loading branch information
belyaev-mikhail committed Jul 27, 2021
1 parent 4f21cbc commit a4eda40
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</scm>

<properties>
<kotlin.version>1.4.31</kotlin.version>
<kotlin.version>1.5.20</kotlin.version>
<jackson.version>2.10.2</jackson.version>
</properties>

Expand Down
3 changes: 1 addition & 2 deletions src/main/kotlin/ru/spbstu/pandoc/jackson/Deserializers.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ private inline infix fun Int.times(body: () -> Unit) {
@Suppress("UNCHECKED_CAST")
class PandocDeserializer<T : Any>(val clazz: KClass<T>) : StdDeserializer<T>(clazz.java) {
val successors = clazz
.nestedClasses
.filter { it.isSubclassOf(clazz) }
.sealedSubclasses
.map { it.simpleName!! to (it as KClass<out T>) }
.toMap()

Expand Down

0 comments on commit a4eda40

Please sign in to comment.