committed by
Stéphane Nicoll
parent
a33b700b12
commit
a39e1c4a09
@@ -33,12 +33,12 @@ public final class ItemIgnore implements Comparable<ItemIgnore> {
|
||||
private final String name;
|
||||
|
||||
private ItemIgnore(ItemType type, String name) {
|
||||
if (name == null) {
|
||||
throw new IllegalArgumentException("'name' must not be null");
|
||||
}
|
||||
if (type == null) {
|
||||
throw new IllegalArgumentException("'type' must not be null");
|
||||
}
|
||||
if (name == null) {
|
||||
throw new IllegalArgumentException("'name' must not be null");
|
||||
}
|
||||
this.type = type;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@@ -92,8 +92,9 @@ public class JsonMarshaller {
|
||||
}
|
||||
JSONObject ignored = object.optJSONObject("ignored");
|
||||
if (ignored != null) {
|
||||
checkAllowedKeys(ignored, path.resolve("ignored"), "properties");
|
||||
addIgnoredProperties(metadata, ignored, path.resolve("ignored"));
|
||||
JsonPath ignoredPath = path.resolve("ignored");
|
||||
checkAllowedKeys(ignored, ignoredPath, "properties");
|
||||
addIgnoredProperties(metadata, ignored, ignoredPath);
|
||||
}
|
||||
return metadata;
|
||||
}
|
||||
|
||||
@@ -348,7 +348,7 @@ class JsonMarshallerTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void shouldCheckIgnoreFields() {
|
||||
void shouldCheckIgnoredFields() {
|
||||
String json = """
|
||||
{
|
||||
"ignored": {
|
||||
@@ -362,7 +362,7 @@ class JsonMarshallerTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void shouldCheckIgnorePropertiesFields() {
|
||||
void shouldCheckIgnoredPropertiesFields() {
|
||||
String json = """
|
||||
{
|
||||
"ignored": {
|
||||
|
||||
Reference in New Issue
Block a user