From 1a89f8211c6ec589305a77188a84b54268ff30d6 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Wed, 25 Nov 2020 18:12:40 +0100 Subject: [PATCH] https://code-repo.d4science.org/D-Net/dnet-hadoop/pulls/61#issuecomment-2505 --- .../dhp/oa/graph/dump/complete/CreateEntityTest.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/dump/complete/CreateEntityTest.java b/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/dump/complete/CreateEntityTest.java index f179e9de5..20c578738 100644 --- a/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/dump/complete/CreateEntityTest.java +++ b/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/dump/complete/CreateEntityTest.java @@ -164,14 +164,9 @@ public class CreateEntityTest { final Consumer consumer = ci -> cInfoList.add(ci); queryInformationSystem.getContextInformation(consumer); - cInfoList.forEach(cInfo -> { - try { - writer.write(new Gson().toJson(Process.getEntity(cInfo))); - } catch (IOException e) { - e.printStackTrace(); - } - }); - + for(ContextInfo cInfo: cInfoList){ + writer.write(new Gson().toJson(Process.getEntity(cInfo))); + } writer.close(); }