X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;ds=inline;f=org.simantics.district.network%2Fsrc%2Forg%2Fsimantics%2Fdistrict%2Fnetwork%2Fprofile%2FThrottledStyleBase.java;h=483f62eddccbb6241f184ef892156f586e4e6de9;hb=4ad7f53b7ed5bcd782ca39020e5e662d8d4c67a1;hp=f820c9222a121537742df253be60889d7a3ee685;hpb=94be073aed6fca8266b2d9ed147c4843f3d23da5;p=simantics%2Fdistrict.git diff --git a/org.simantics.district.network/src/org/simantics/district/network/profile/ThrottledStyleBase.java b/org.simantics.district.network/src/org/simantics/district/network/profile/ThrottledStyleBase.java index f820c922..483f62ed 100644 --- a/org.simantics.district.network/src/org/simantics/district/network/profile/ThrottledStyleBase.java +++ b/org.simantics.district.network/src/org/simantics/district/network/profile/ThrottledStyleBase.java @@ -14,7 +14,6 @@ package org.simantics.district.network.profile; import java.util.Optional; import java.util.concurrent.atomic.AtomicLong; -import org.simantics.databoard.Bindings; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.common.request.UnaryRead; @@ -72,10 +71,12 @@ public abstract class ThrottledStyleBase extends StyleBase result) { - if (!result.equals(Optional.empty())) { + if (!Optional.empty().equals(result) && result != null) { applyThrottledStyleForNode(evaluationContext, node, result.get()); } else { LOGGER.debug("Do not apply as results are unchanged for {} {} {}", evaluationContext, node, result); + // TODO: fix this duplicate method invocation with null + applyThrottledStyleForNode(evaluationContext, node, null); } } @@ -93,7 +94,8 @@ public abstract class ThrottledStyleBase extends StyleBase