Added comments + extra logic for explicitly ignored base collection/array types (which are part of the parsing logic, but not something the user edits)

master
Robinson 2023-08-21 12:37:35 +02:00
parent 55fd446005
commit 756c90a6f2
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C
2 changed files with 10 additions and 1 deletions

View File

@ -742,7 +742,10 @@ class ConfigProcessor<T : Any>
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
}

View File

@ -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<*>