X-Git-Url: https://gerrit.onap.org/r/gitweb?p=aai%2Fmodel-loader.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fonap%2Faai%2Fmodelloader%2Fservice%2FModelLoaderService.java;h=dc17dfe6decc58c384d5c4a10be1c02612138efc;hp=22f7671770daf6e24850f19cecc30ebf4baaecfb;hb=117237ac7b65395e0f29b6cead9f6ffec2e7dc0f;hpb=59b12dd8dc8b86d6ecdfb3d51ca141a0c3e58c36 diff --git a/src/main/java/org/onap/aai/modelloader/service/ModelLoaderService.java b/src/main/java/org/onap/aai/modelloader/service/ModelLoaderService.java index 22f7671..dc17dfe 100644 --- a/src/main/java/org/onap/aai/modelloader/service/ModelLoaderService.java +++ b/src/main/java/org/onap/aai/modelloader/service/ModelLoaderService.java @@ -63,7 +63,7 @@ import org.springframework.web.bind.annotation.RestController; @RequestMapping("/services/model-loader/v1/model-service") public class ModelLoaderService implements ModelLoaderInterface { - private static Logger logger = LoggerFactory.getInstance().getLogger(ModelLoaderService.class.getName()); + private static final Logger logger = LoggerFactory.getInstance().getLogger(ModelLoaderService.class.getName()); @Value("${CONFIG_HOME}") private String configDir; @@ -84,21 +84,6 @@ public class ModelLoaderService implements ModelLoaderInterface { try (InputStream configInputStream = Files.newInputStream(Paths.get(configDir, "model-loader.properties"))) { configProperties.load(configInputStream); config = new ModelLoaderConfig(configProperties); - - // Set the truststore for SDC Client to connect to Dmaap central bus if applicable (as in case of TI) - if (Boolean.TRUE.equals(config.isUseHttpsWithDmaap())) { - String trustStorePath = config.getKeyStorePath(); - String trustStorePassword = config.getKeyStorePassword(); - if (trustStorePath != null && Paths.get(trustStorePath).toFile().isFile() && trustStorePassword != null - && !trustStorePassword.isEmpty()) { - System.setProperty("javax.net.ssl.trustStore", trustStorePath); - System.setProperty("javax.net.ssl.trustStorePassword", trustStorePassword); - } else { - throw new IllegalArgumentException("Model Loader property ml.distribution.KEYSTORE_FILE " - + "or ml.distribution.KEYSTORE_PASSWORD not set or invalid"); - } - } - if (!config.getASDCConnectionDisabled()) { initSdcClient(); }