Currently job artifacts in CI/CD pipelines on LRZ GitLab never expire. Starting from Wed 26.1.2022 the default expiration time will be 30 days (GitLab default). Currently existing artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit 43e2ac24 authored by Jakob Schöttl's avatar Jakob Schöttl
Browse files

Search for "gson" and fix occurrences

parent ad3092b3
......@@ -28,11 +28,12 @@ public class TestVadereTestProject {
@Test
public void testToJSON() throws IOException {
// TODO implement json test
/*
* String json = IOUtils.toPrettyPrintJson(IOVadere.toJson(testProject));
* // System.out.println(json);
*
* Map<String, Object> store = new Gson().fromJson(json, Map.class);
* Map<String, Object> store = fromJson(json, Map.class);
*
* assertEquals(testProject.getName(), store.get("name"));
*
......@@ -48,6 +49,7 @@ public class TestVadereTestProject {
@Test
public void testFromJSON() throws IOException {
// TODO implement json test
/*
* String json = IOUtils.toPrettyPrintJson(IOVadere.toJson(testProject));
* VadereProject testInstanceNew = IOVadere.projectFromJson(json);
......
......@@ -31,10 +31,6 @@ import org.vadere.util.geometry.shapes.VPoint;
public class PedestrianOSM extends Pedestrian {
/**
* transient fields will not be serialized by Gson.
*/
private final AttributesOSM attributesOSM;
private final transient StepCircleOptimizer stepCircleOptimizer;
private final transient UpdateSchemeOSM updateScheme;
......
......@@ -49,7 +49,10 @@ public class AttributesSource extends Attributes {
private DynamicElementType dynamicElementType = DynamicElementType.PEDESTRIAN;
/**
* This (private) default constructor is used by Gson. Without it, the initial field assignments
* This (private) default constructor is used by Jackson.
* TODO is this still correct for Jackson (for Gson it was)?
*
* Without it, the initial field assignments
* above have no effect. In other words, no default values for fields are possible without a
* default constructor.
*/
......
......@@ -24,7 +24,7 @@ public class AttributesStairs extends Attributes {
private Vector2D upwardDirection = new Vector2D(1.0, 0.0);
public AttributesStairs() {
// needs to be present for GSON
// TODO may be required for Jackson?
}
public AttributesStairs(int id) {
......
......@@ -21,9 +21,9 @@ public class Pedestrian extends Agent {
// TODO used at all? Car does NOT have this field. remove if unused!
private ScenarioElementType type = ScenarioElementType.PEDESTRIAN;
/* this constructor will be called by gson */
@SuppressWarnings("unused")
private Pedestrian() {
// TODO constructor may be required for Jackson?
this(new AttributesAgent());
}
......
......@@ -209,7 +209,9 @@ public abstract class StateJsonConverter {
ObjectNode topographyNode = mapper.createObjectNode();
JsonNode attributesNode = mapper.convertValue(topography.getAttributes(), JsonNode.class);
((ObjectNode) attributesNode.get("bounds")).remove("type"); // manually remove that field to match the old GSON-format, seems easier than avoiding it selectively
// manually remove that field to match the old gson-format, seems easier than avoiding it selectively
// TODO what does this mean?
((ObjectNode) attributesNode.get("bounds")).remove("type");
topographyNode.set("attributes", attributesNode);
ArrayNode obstacleNodes = mapper.createArrayNode();
......
Markdown is supported
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