From 756c90a6f26bf4af55fed48eb8927a8718661cb1 Mon Sep 17 00:00:00 2001 From: Robinson Date: Mon, 21 Aug 2023 12:37:35 +0200 Subject: [PATCH] Added comments + extra logic for explicitly ignored base collection/array types (which are part of the parsing logic, but not something the user edits) --- src/dorkbox/config/ConfigProcessor.kt | 5 ++++- src/dorkbox/config/ConfigProp.kt | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/dorkbox/config/ConfigProcessor.kt b/src/dorkbox/config/ConfigProcessor.kt index 2176da3..459a9cd 100644 --- a/src/dorkbox/config/ConfigProcessor.kt +++ b/src/dorkbox/config/ConfigProcessor.kt @@ -742,7 +742,10 @@ class ConfigProcessor val returnType = prop.returnType if (!prop.isSupported()) { - LoggerFactory.getLogger(ConfigProcessor::class.java).error("${prop.member.name} (${returnType.javaObjectType.simpleName}) overloading is not supported. Ignoring") + if (!prop.ignore) { + // only show an error if we are not the proper type. We explicitly ignore BASE collection/array types - so properly ignore those + LoggerFactory.getLogger(ConfigProcessor::class.java).error("${prop.member.name} (${returnType.javaObjectType.simpleName}) overloading is not supported. Ignoring") + } return@forEach } diff --git a/src/dorkbox/config/ConfigProp.kt b/src/dorkbox/config/ConfigProp.kt index 0fe1329..f087e63 100644 --- a/src/dorkbox/config/ConfigProp.kt +++ b/src/dorkbox/config/ConfigProp.kt @@ -41,6 +41,12 @@ internal data class ConfigProp(val key: String, val parentConf: ConfigProp?, val var override = false + /** + * We explicitly ignore BASE collection/array types. + * + * We have them as part of our parsing logic, so that we can properly set collection/array values, but do not want them for + * "general" logic + */ @Synchronized fun isSupported(): Boolean { return !ignore && member is KMutableProperty<*>