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=087d4a2f6c4ea1dbc9ed889ba7d612e9c5a86210;p=simantics%2Fdistrict.git Avoid exception for non-unique keys in tech type table gitlab #93 Change-Id: I6c258b4dd11403419a7a1dd986ec449ea7602e4e (cherry picked from commit dcfefc75af1dbd93f8647e24a09053d2638d2f57) --- 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 {