From 9436bf9b21fc26aa7eb41d128ebe42c9668cedf4 Mon Sep 17 00:00:00 2001 From: Marko Luukkainen Date: Tue, 13 Mar 2018 11:45:48 +0200 Subject: [PATCH] SingleObjectWithType was broken in the previous change refs #7803 Change-Id: I4ad3281195144f5f70dd0cc86e2348663d0d1c02 --- .../simantics/db/common/request/SingleObjectWithType.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/bundles/org.simantics.db.common/src/org/simantics/db/common/request/SingleObjectWithType.java b/bundles/org.simantics.db.common/src/org/simantics/db/common/request/SingleObjectWithType.java index a98603488..a95f28728 100644 --- a/bundles/org.simantics.db.common/src/org/simantics/db/common/request/SingleObjectWithType.java +++ b/bundles/org.simantics.db.common/src/org/simantics/db/common/request/SingleObjectWithType.java @@ -32,12 +32,8 @@ public final class SingleObjectWithType extends ResourceRead3 { int resultCount = 0; for (Resource object : graph.getObjects(resource, resource2)) { if (graph.isInstanceOf(object, resource3)) { - if (result == null) { - result = object; - } else { - // okay, too many results but lets calculate for debug - resultCount++; - } + result = object; + resultCount++; } } -- 2.47.1