Skip to content

Commit

Permalink
Activate FAIL_ON_UNKNOWN_PROPERTIES for tests in JsonUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
jmini committed Feb 7, 2024
1 parent d321fe5 commit 901ecb7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/test/java/org/gitlab4j/api/JsonUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.MapperFeature;
Expand All @@ -34,6 +35,7 @@ public class JsonUtils {
jacksonJson = new JacksonJson();
jacksonJson.getObjectMapper().configure(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS, true);
jacksonJson.getObjectMapper().configure(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY, true);
jacksonJson.getObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true);
}

static JsonNode readTreeFromMap(Map<String, Object> map) throws JsonParseException, JsonMappingException, IOException {
Expand Down

0 comments on commit 901ecb7

Please sign in to comment.