fix NPE for scala gatling generator (#1479)

This commit is contained in:
William Cheng
2018-11-19 11:06:16 +08:00
committed by GitHub
parent 0e693cd9a8
commit f58bd6d839

View File

@@ -239,6 +239,11 @@ public class ScalaGatlingCodegen extends AbstractScalaCodegen implements Codegen
continue;
}
for (Operation operation : path.readOperations()) {
if (operation.getExtensions() == null) {
operation.setExtensions(new HashMap());
}
if (!operation.getExtensions().keySet().contains("x-gatling-path")) {
if (pathname.contains("{")) {
String gatlingPath = pathname.replaceAll("\\{", "\\$\\{");