Skip to content

Commit 58ebf19

Browse files
committed
đź”§ chore: update backwards compatible serializer registration in SpongeConfigManager
- add comment to clarify exception handling for OLD_CONFIG_SERIALIZABLE_ANNOTATION - ensure serializers are registered only when necessary
1 parent cacd085 commit 58ebf19

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎surf-api-core/surf-api-core/src/main/kotlin/dev/slne/surf/api/core/config/manager/SpongeConfigManager.kt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ class SpongeConfigManager<C> private constructor(
243243
surfSpongeConfigSerializers.buildSerializersModule().accept(serializers)
244244

245245
try {
246-
OldSpongeReflections.OLD_CONFIG_SERIALIZABLE_ANNOTATION
246+
OldSpongeReflections.OLD_CONFIG_SERIALIZABLE_ANNOTATION // If this throws an exception, there are no none relocated annotations, no need to register — most likely the standalone version
247247
serializers.registerBackwardsCompatibleSerializers()
248248
} catch (_: Exception) {
249249
// no none relocated annotations, no need to register

0 commit comments

Comments
 (0)