Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid W. Miller2017-10-13 16:43:51 -0400
committerDavid Miller2017-10-16 16:19:40 -0400
commitbfb5e146247d51954e1c36527c7c5c2962a73e4b (patch)
tree5ee5c8885db8b1efc5fa2b3691d19d1614d6cfc2
parent14132ecbef674c8ab406699736ca03415f22473d (diff)
downloadorg.eclipse.osee-bfb5e146247d51954e1c36527c7c5c2962a73e4b.tar.gz
org.eclipse.osee-bfb5e146247d51954e1c36527c7c5c2962a73e4b.tar.xz
org.eclipse.osee-bfb5e146247d51954e1c36527c7c5c2962a73e4b.zip
refinement: Eliminate service count overflow
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/ServiceUtil.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/ServiceUtil.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/ServiceUtil.java
index bb5402e8c7..5f049fcced 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/ServiceUtil.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/ServiceUtil.java
@@ -30,6 +30,8 @@ import org.osgi.framework.BundleException;
public final class ServiceUtil {
+ private static IOseeCachingService cacheService;
+
private ServiceUtil() {
// Utility class
}
@@ -47,7 +49,10 @@ public final class ServiceUtil {
}
public static IOseeCachingService getOseeCacheService() throws OseeCoreException {
- return getService(IOseeCachingService.class);
+ if (cacheService == null) {
+ cacheService = getService(IOseeCachingService.class);
+ }
+ return cacheService;
}
public static AttributeAdapterService getAttributeAdapterService() throws OseeCoreException {

Back to the top