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%2FSessionThreads.java;h=90e78e45b5caeaf472fe68044b0e6ce135e90731;hp=a3a57962efc927af920697b3f254a99151f9d687;hb=25e3207c8a1aad3cbe72202750f67f0483ccb1a2;hpb=969bd23cab98a79ca9101af33334000879fb60c5 diff --git a/bundles/org.simantics.db.common/src/org/simantics/db/common/SessionThreads.java b/bundles/org.simantics.db.common/src/org/simantics/db/common/SessionThreads.java index a3a57962e..90e78e45b 100644 --- a/bundles/org.simantics.db.common/src/org/simantics/db/common/SessionThreads.java +++ b/bundles/org.simantics.db.common/src/org/simantics/db/common/SessionThreads.java @@ -1,21 +1,21 @@ -package org.simantics.db.common; - -import org.simantics.db.Session; -import org.simantics.db.service.LifecycleSupport; - - -public class SessionThreads { - - public static boolean isClosed() { - Thread current = Thread.currentThread(); - if(current instanceof SessionThread) { - Session session = ((SessionThread)current).getSession(); - LifecycleSupport ls = session.peekService(LifecycleSupport.class); - if(ls != null) return ls.isClosed(); - else return true; - } else { - return false; - } - } - -} +package org.simantics.db.common; + +import org.simantics.db.Session; +import org.simantics.db.service.LifecycleSupport; + + +public class SessionThreads { + + public static boolean isClosed() { + Thread current = Thread.currentThread(); + if(current instanceof SessionThread) { + Session session = ((SessionThread)current).getSession(); + LifecycleSupport ls = session.peekService(LifecycleSupport.class); + if(ls != null) return ls.isClosed(); + else return true; + } else { + return false; + } + } + +}