diff options
author | mmis <michael.morris@ericsson.com> | 2018-03-21 15:22:10 +0000 |
---|---|---|
committer | mmis <michael.morris@ericsson.com> | 2018-03-22 13:58:39 +0000 |
commit | af861a9d8e28d49d357ead4a4acad82554510b6f (patch) | |
tree | 8f21c330990242ed4a2b40b13bae811a9affc7fb /controlloop/common/feature-controlloop-utils/src | |
parent | 512a8f5b4dc9afaf382dd76531dcbc0667551c58 (diff) |
Removed checkstyle warnings
Removed checkstyle warnings in:
policy/drools-applications/controlloop/common/actors
policy/drools-applications/controlloop/common/eventmanager
policy/drools-applications/controlloop/common/feature-controlloop-utils
Issue-ID: POLICY-705
Change-Id: Iccf99b291bc62bc3ba2082ccdb4c1f9e12107896
Signed-off-by: mmis <michael.morris@ericsson.com>
Diffstat (limited to 'controlloop/common/feature-controlloop-utils/src')
2 files changed, 37 insertions, 39 deletions
diff --git a/controlloop/common/feature-controlloop-utils/src/main/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeature.java b/controlloop/common/feature-controlloop-utils/src/main/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeature.java index 3cee70eda..99597f52d 100644 --- a/controlloop/common/feature-controlloop-utils/src/main/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeature.java +++ b/controlloop/common/feature-controlloop-utils/src/main/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeature.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,36 +30,33 @@ import org.slf4j.LoggerFactory; /** * PDP-D feature for lab environments that provides Server simulation capabilities for AAI, SO, and - * VFC + * VFC. * */ public class ControlLoopUtilsFeature implements PolicyEngineFeatureAPI { - /** - * Logger - */ - private static Logger logger = LoggerFactory.getLogger(ControlLoopUtilsFeature.class); - - @Override - public boolean afterStart(PolicyEngine engine) { - try { - Util.buildAaiSim(); - Util.buildSoSim(); - Util.buildVfcSim(); - Util.buildGuardSim(); - } catch (final InterruptedException e) { - logger.error("{}: initialization aborted", ControlLoopUtilsFeature.class.getName(), e); - Thread.currentThread().interrupt(); - } catch (final IOException e) { - logger.error("{}: a simulator cannot be built because of {}", - ControlLoopUtilsFeature.class.getName(), e.getMessage(), e); + private static Logger logger = LoggerFactory.getLogger(ControlLoopUtilsFeature.class); + + @Override + public boolean afterStart(PolicyEngine engine) { + try { + Util.buildAaiSim(); + Util.buildSoSim(); + Util.buildVfcSim(); + Util.buildGuardSim(); + } catch (final InterruptedException e) { + logger.error("{}: initialization aborted", ControlLoopUtilsFeature.class.getName(), e); + Thread.currentThread().interrupt(); + } catch (final IOException e) { + logger.error("{}: a simulator cannot be built because of {}", ControlLoopUtilsFeature.class.getName(), + e.getMessage(), e); + } + return false; } - return false; - } - @Override - public int getSequenceNumber() { - return 100000; - } + @Override + public int getSequenceNumber() { + return 100000; + } } diff --git a/controlloop/common/feature-controlloop-utils/src/test/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeatureTest.java b/controlloop/common/feature-controlloop-utils/src/test/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeatureTest.java index 2a8bc35ea..edb48fed5 100644 --- a/controlloop/common/feature-controlloop-utils/src/test/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeatureTest.java +++ b/controlloop/common/feature-controlloop-utils/src/test/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeatureTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ * limitations under the License. * ============LICENSE_END========================================================= */ + package org.onap.policy.drools.apps.controlloop.feature.utils; import static org.junit.Assert.assertNotNull; @@ -28,20 +29,20 @@ import org.onap.policy.drools.utils.LoggerUtil; import org.onap.policy.simulators.Util; /** - * ControlLoopUtilsFeature JUnit Tests + * ControlLoopUtilsFeature JUnit Tests. */ public class ControlLoopUtilsFeatureTest { - @Test - public void simulate() { - LoggerUtil.setLevel("ROOT", "INFO"); - LoggerUtil.setLevel("org.eclipse.jetty", "WARN"); - final ControlLoopUtilsFeature feature = new ControlLoopUtilsFeature(); - feature.afterStart(PolicyEngine.manager); - assertNotNull(HttpServletServer.factory.get(Util.AAISIM_SERVER_PORT)); - assertNotNull(HttpServletServer.factory.get(Util.SOSIM_SERVER_PORT)); - assertNotNull(HttpServletServer.factory.get(Util.SOSIM_SERVER_PORT)); - assertNotNull(HttpServletServer.factory.get(Util.GUARDSIM_SERVER_PORT)); - } + @Test + public void simulate() { + LoggerUtil.setLevel("ROOT", "INFO"); + LoggerUtil.setLevel("org.eclipse.jetty", "WARN"); + final ControlLoopUtilsFeature feature = new ControlLoopUtilsFeature(); + feature.afterStart(PolicyEngine.manager); + assertNotNull(HttpServletServer.factory.get(Util.AAISIM_SERVER_PORT)); + assertNotNull(HttpServletServer.factory.get(Util.SOSIM_SERVER_PORT)); + assertNotNull(HttpServletServer.factory.get(Util.SOSIM_SERVER_PORT)); + assertNotNull(HttpServletServer.factory.get(Util.GUARDSIM_SERVER_PORT)); + } } |