Bladeren bron

Rename map to flatMap in EitherStream

Sam Jaffe 6 jaren geleden
bovenliggende
commit
e2b134a00a
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1 1
      src/main/lombok/org/leumasjaffe/json/schema/tester/PropertyNameTester.java

+ 1 - 1
src/main/lombok/org/leumasjaffe/json/schema/tester/PropertyNameTester.java

@@ -24,7 +24,7 @@ public class PropertyNameTester implements Tester {
 	public void validate(JsonNode node) throws ValidationException {
 		final List<ValidationException> exceptions =
 				EitherStream.from(JsonHelper.fieldNames(node, TextNode::valueOf))
-				.map(schema::validate, ValidationException.class)
+				.flatMap(schema::validate, ValidationException.class)
 				.collect(Collectors.toList());
 		if (!exceptions.isEmpty()) {
 			throw new ValidationException("propertyNames", "unable to match property names",