From 105ce0729d5333cc095ef5bd8104a6c5b90cc9f0 Mon Sep 17 00:00:00 2001 From: "andre.schmid" Date: Fri, 18 Oct 2019 14:58:21 +0100 Subject: Fix factory instance creation instability Refactor the factory registry and instance creation. Remove unnecessary static code in Factory creation. Centralize the responsibility to read the factory registry configuration and cache the factory instances in a Singleton called FactoryRegistryManager. Clean the base abstract factory that was sharing non factory code, it had all the factory registry code statically, never used by the concrete factory classes. Change-Id: Ie2e9c29013acd36ddaf15383dd6b06432fbdbb66 Issue-ID: SDC-1905 Signed-off-by: andre.schmid --- .../core/translator/factory/HeatToToscaTranslatorFactory.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'openecomp-be/lib/openecomp-sdc-translator-lib') diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-api/src/main/java/org/openecomp/core/translator/factory/HeatToToscaTranslatorFactory.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-api/src/main/java/org/openecomp/core/translator/factory/HeatToToscaTranslatorFactory.java index 2b7b00f435..ebc497374d 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-api/src/main/java/org/openecomp/core/translator/factory/HeatToToscaTranslatorFactory.java +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-api/src/main/java/org/openecomp/core/translator/factory/HeatToToscaTranslatorFactory.java @@ -21,7 +21,6 @@ package org.openecomp.core.translator.factory; import org.openecomp.core.factory.api.AbstractComponentFactory; -import org.openecomp.core.factory.api.AbstractFactory; import org.openecomp.core.translator.api.HeatToToscaTranslator; @@ -30,6 +29,6 @@ public abstract class HeatToToscaTranslatorFactory extends AbstractComponentFactory { public static HeatToToscaTranslatorFactory getInstance() { - return AbstractFactory.getInstance(HeatToToscaTranslatorFactory.class); + return getInstance(HeatToToscaTranslatorFactory.class); } } -- cgit 1.2.3-korg