瀏覽代碼

Rename map to flatMap in EitherStream

Sam Jaffe 6 年之前
父節點
當前提交
e2b134a00a
共有 1 個文件被更改,包括 1 次插入1 次删除
  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",