fix(gateway-vertx) Handle nulls in JSON to Map conversion.
MODIFY
gateway/platforms/vertx3/vertx3/src/main/java/io/apiman/gateway/platforms/vertx3/common/config/VertxEngineConfig.java
gateway/platforms/vertx3/vertx3/src/main/java/io/apiman/gateway/platforms/vertx3/common/config/VertxEngineConfig.java
@@ -318,13 +318,17 @@ public class VertxEngineConfig implements IEngineConfig {
list.forEach(elem -> jsonMapToProperties(pathSoFar, elem, output));
} else { // Value
if (output.containsKey(pathSoFar)) {
- output.put(pathSoFar, SimpleStringUtils.join(",", output.get(pathSoFar), value.toString()));
+ output.put(pathSoFar, SimpleStringUtils.join(",", output.get(pathSoFar), valueOrNull(value)));
} else {
- output.put(pathSoFar, value.toString());
+ output.put(pathSoFar, valueOrNull(value));
}
}
}
+ private String valueOrNull(Object value) {
+ return value == null ? null : value.toString();
+ }
+
private String determineKey(String pathSoFar, String key) {
return pathSoFar.length() == 0 ? key : pathSoFar + "." + key;
}

fix(gateway-vertx) Handle nulls in JSON to Map conversion.