X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.db.common%2Fsrc%2Forg%2Fsimantics%2Fdb%2Fcommon%2Futils%2FListUtils.java;h=a197de88013dec935b1a46c3fb680c5fdf1831e9;hp=3631de4b38b7110c74f2bb0fab91796d9862d99c;hb=f016d40e5f6a2dca277a317188d1bb73b8255118;hpb=da7836ef4008c742ae62af3ed7c3218492456adf diff --git a/bundles/org.simantics.db.common/src/org/simantics/db/common/utils/ListUtils.java b/bundles/org.simantics.db.common/src/org/simantics/db/common/utils/ListUtils.java index 3631de4b3..a197de880 100644 --- a/bundles/org.simantics.db.common/src/org/simantics/db/common/utils/ListUtils.java +++ b/bundles/org.simantics.db.common/src/org/simantics/db/common/utils/ListUtils.java @@ -54,13 +54,8 @@ public class ListUtils { * Creates a list containing the given {@code elements}. */ public static Resource create(WriteGraph g, Iterable elements) throws DatabaseException { - Layer0 L0 = Layer0.getInstance(g); - - Resource list = g.newResource(); - g.claim(list, L0.InstanceOf, L0.List); - - insertBetween(g, L0, list, list, list, elements); - return list; + Layer0 L0 = Layer0.getInstance(g); + return ListUtils.create(g,L0.List, L0.List_ElementWithInverse, L0.List_ElementWithInverse_Inverse, elements); } /**