X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=models-interactions%2Fmodel-simulators%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fsimulators%2FUtil.java;fp=models-interactions%2Fmodel-simulators%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fsimulators%2FUtil.java;h=51f2f9d46ac3b7a983c0e8e55e2109f2bebe1d38;hb=6372b62fcd8813d7d49fb279b933ffe2e4637048;hp=d9fb52bd9798d537c4df9df7a5dfe67d7975c74e;hpb=da708d64dc27f36ed5da733fca14ebfb4cc2832b;p=policy%2Fmodels.git diff --git a/models-interactions/model-simulators/src/main/java/org/onap/policy/simulators/Util.java b/models-interactions/model-simulators/src/main/java/org/onap/policy/simulators/Util.java index d9fb52bd9..51f2f9d46 100644 --- a/models-interactions/model-simulators/src/main/java/org/onap/policy/simulators/Util.java +++ b/models-interactions/model-simulators/src/main/java/org/onap/policy/simulators/Util.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * simulators * ================================================================================ - * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2019, 2021 AT&T Intellectual Property. All rights reserved. * Modifications Copyright (C) 2019 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -22,7 +22,6 @@ package org.onap.policy.simulators; import java.io.IOException; -import java.util.Properties; import org.onap.policy.common.endpoints.http.server.HttpServletServer; import org.onap.policy.common.endpoints.http.server.HttpServletServerFactoryInstance; import org.onap.policy.common.endpoints.properties.PolicyEndPointProperties; @@ -81,7 +80,7 @@ public class Util { * @throws IOException if an I/O error occurs */ public static CdsSimulator buildCdsSim() throws InterruptedException, IOException { - final CdsSimulator testServer = new CdsSimulator(LOCALHOST, CDSSIM_SERVER_PORT); + final var testServer = new CdsSimulator(LOCALHOST, CDSSIM_SERVER_PORT); testServer.start(); waitForServerToListen(testServer.getPort()); return testServer; @@ -155,7 +154,7 @@ public class Util { * @throws InterruptedException if a thread is interrupted */ public static HttpServletServer buildDmaapSim() throws InterruptedException { - String json = ResourceUtils.getResourceAsString("org/onap/policy/simulators/dmaap/DmaapParameters.json"); + var json = ResourceUtils.getResourceAsString("org/onap/policy/simulators/dmaap/DmaapParameters.json"); DmaapSimParameterGroup params = null; try { params = new StandardCoder().decode(json, DmaapSimParameterGroup.class); @@ -166,7 +165,7 @@ public class Util { DmaapSimProvider.setInstance(new DmaapSimProvider(params)); - Properties props = DmaapSimRestServer.getServerProperties(params.getRestServerParameters()); + var props = DmaapSimRestServer.getServerProperties(params.getRestServerParameters()); final String svcpfx = PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES + "." + params.getRestServerParameters().getName();