From: Reino Ruusu Date: Fri, 9 Oct 2020 06:02:28 +0000 (+0300) Subject: Avoid exception for non-unique keys in tech type table X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F25%2F4525%2F1;p=simantics%2Fdistrict.git Avoid exception for non-unique keys in tech type table gitlab #93 Change-Id: I6c258b4dd11403419a7a1dd986ec449ea7602e4e --- diff --git a/org.simantics.district.network/src/org/simantics/district/network/techtype/requests/TechTypeTableData.java b/org.simantics.district.network/src/org/simantics/district/network/techtype/requests/TechTypeTableData.java index 60929edd..e09db0ac 100644 --- a/org.simantics.district.network/src/org/simantics/district/network/techtype/requests/TechTypeTableData.java +++ b/org.simantics.district.network/src/org/simantics/district/network/techtype/requests/TechTypeTableData.java @@ -63,7 +63,7 @@ public class TechTypeTableData extends BinaryRead r.containsKey(keyName)) - .collect(Collectors.toMap(r -> r.get(keyName), r -> r)); + .collect(Collectors.toMap(r -> r.get(keyName), r -> r, (p, q) -> p)); } private String getKeyName(ReadGraph graph, Resource table) throws DatabaseException {