Commit 540d8865 authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Trim field mapping names

To ensure that there is no trailing whitespace.
parent a0f779a4
Pipeline #10463 passed with stages
in 7 minutes and 52 seconds
......@@ -324,7 +324,7 @@ class MappingConfig(directory: String) {
if (field != null) {
values["value"].let { value ->
if (value != null) {
PrefixField(key, value, field)
PrefixField(key, value, field.trim())
} else {
throw InvalidMappingException("Section: $key. A 'value' subfield in prefix definition is required.")
}
......@@ -337,7 +337,7 @@ class MappingConfig(directory: String) {
private fun parseSimpleAnnotationField(key: String, item: Any): SimpleAnnotationField {
return when (item) {
is String -> DirectMapField(key, item)
is String -> DirectMapField(key, item.trim())
is Map<*, *> -> {
when {
item.containsKey("const") -> {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment