[Fix] Removed cherry-picked code not usable
This commit is contained in:
parent
63766041e1
commit
fe4b66dead
|
@ -56,7 +56,6 @@ public class StrolchElementToJsonVisitor implements StrolchElementVisitor<JsonEl
|
||||||
private boolean withoutPolicies;
|
private boolean withoutPolicies;
|
||||||
private boolean withoutStateVariables;
|
private boolean withoutStateVariables;
|
||||||
private boolean withoutValueChanges;
|
private boolean withoutValueChanges;
|
||||||
private boolean withListParametersAsArray;
|
|
||||||
private int activityDepth = Integer.MAX_VALUE;
|
private int activityDepth = Integer.MAX_VALUE;
|
||||||
|
|
||||||
public StrolchElementToJsonVisitor() {
|
public StrolchElementToJsonVisitor() {
|
||||||
|
@ -103,10 +102,6 @@ public class StrolchElementToJsonVisitor implements StrolchElementVisitor<JsonEl
|
||||||
return this.withoutValueChanges;
|
return this.withoutValueChanges;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isWithListParametersAsArray() {
|
|
||||||
return this.withListParametersAsArray;
|
|
||||||
}
|
|
||||||
|
|
||||||
public StrolchElementToJsonVisitor withBagId() {
|
public StrolchElementToJsonVisitor withBagId() {
|
||||||
this.withBagId = true;
|
this.withBagId = true;
|
||||||
return this;
|
return this;
|
||||||
|
@ -647,19 +642,6 @@ public class StrolchElementToJsonVisitor implements StrolchElementVisitor<JsonEl
|
||||||
rootJ.addProperty(paramId, (Boolean) param.getValue());
|
rootJ.addProperty(paramId, (Boolean) param.getValue());
|
||||||
} else if (type.isNumber()) {
|
} else if (type.isNumber()) {
|
||||||
rootJ.addProperty(paramId, (Number) param.getValue());
|
rootJ.addProperty(paramId, (Number) param.getValue());
|
||||||
} else if (this.withListParametersAsArray && type.isList()) {
|
|
||||||
JsonArray valuesJ = switch (type) {
|
|
||||||
case FLOAT_LIST -> ((FloatListParameter) param).streamValues()
|
|
||||||
.collect(JsonArray::new, JsonArray::add, JsonArray::addAll);
|
|
||||||
case INTEGER_LIST -> ((IntegerListParameter) param).streamValues()
|
|
||||||
.collect(JsonArray::new, JsonArray::add, JsonArray::addAll);
|
|
||||||
case STRING_LIST -> ((StringListParameter) param).streamValues()
|
|
||||||
.collect(JsonArray::new, JsonArray::add, JsonArray::addAll);
|
|
||||||
case LONG_LIST -> ((LongListParameter) param).streamValues()
|
|
||||||
.collect(JsonArray::new, JsonArray::add, JsonArray::addAll);
|
|
||||||
default -> throw new IllegalStateException("Unhandle list type " + type);
|
|
||||||
};
|
|
||||||
rootJ.add(paramId, valuesJ);
|
|
||||||
} else {
|
} else {
|
||||||
rootJ.addProperty(paramId, param.getValueAsString());
|
rootJ.addProperty(paramId, param.getValueAsString());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue