fix(manager-api-war): handle comma-separated lists properly in `apiman.properties`
Fixes:
MODIFY
gateway/platforms/war/src/main/java/io/apiman/gateway/platforms/war/WarEngineConfig.java
gateway/platforms/war/src/main/java/io/apiman/gateway/platforms/war/WarEngineConfig.java
@@ -341,7 +341,15 @@ public class WarEngineConfig implements IEngineConfig {
continue;
}
String shortKey = key.substring(prefix.length() + 1);
- rval.put(shortKey, config.getString(key));
+ String[] values = config.getStringArray(key);
+ if (values.length == 0) {
+ rval.put(shortKey, null);
+ } else if (values.length == 1) {
+ rval.put(shortKey, values[0]);
+ } else {
+ // Rejoin array into comma-separated to preserve compatibility.
+ rval.put(shortKey, String.join(",", values));
+ }
}
return rval;
}

fix(manager-api-war): handle comma-separated lists properly in `apiman.properties`

Fixes: #1976