Skip to content
This repository was archived by the owner on Dec 3, 2022. It is now read-only.

Commit 80ef72a

Browse files
committed
fix config type cast
1 parent c269b29 commit 80ef72a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/java/top/wetabq/easyapi/config/encoder/advance/AdvanceCodecEasyConfig.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ abstract class AdvanceCodecEasyConfig<T>(
1212

1313
@Suppress("UNCHECKED_CAST")
1414
override fun initFromConfigSecion(configSection: ConfigSection) {
15-
(configSection[sectionName] as LinkedHashMap<String, LinkedHashMap<String, *>>).forEach { (s, any) ->
16-
simpleConfig[s] = decode(any)
15+
(configSection[sectionName] as LinkedHashMap<String, Any>).forEach { (s, any) ->
16+
if (any is LinkedHashMap<*, *>) {
17+
simpleConfig[s] = decode(any as LinkedHashMap<String, *>)
18+
}
1719
}
1820
}
1921

0 commit comments

Comments
 (0)