]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.common/src/org/simantics/db/common/request/SingleObjectWithType.java
SingleObjectWithType was broken in the previous change
[simantics/platform.git] / bundles / org.simantics.db.common / src / org / simantics / db / common / request / SingleObjectWithType.java
index a986034889963bf6eedcdd99ff17fc4c3d9d2aef..a95f28728cd04581736cfe2d4f6abd89d14f794d 100644 (file)
@@ -32,12 +32,8 @@ public final class SingleObjectWithType extends ResourceRead3<Resource> {
         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++;
             }
         }