diff options
author | Seshu Kumar M <seshu.kumar.m@huawei.com> | 2018-08-28 07:51:34 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-08-28 07:51:34 +0000 |
commit | eb94991c543a1d9cf3c9b6c4dfca921dedf48da5 (patch) | |
tree | 5cf3ccc629b215aaa3cab0f1f074a2a0e35f7cda /asdc-controller | |
parent | 963b2eb3fd0af7da96554860d17558242db4616f (diff) | |
parent | f602b7b904fd68b409a310291da8fb37b029228b (diff) |
Merge "Fixed Sonar isssue"
Diffstat (limited to 'asdc-controller')
-rw-r--r-- | asdc-controller/src/main/java/org/onap/so/asdc/ASDCControllerSingleton.java | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/ASDCControllerSingleton.java b/asdc-controller/src/main/java/org/onap/so/asdc/ASDCControllerSingleton.java index 0ed878446f..471a08bf99 100644 --- a/asdc-controller/src/main/java/org/onap/so/asdc/ASDCControllerSingleton.java +++ b/asdc-controller/src/main/java/org/onap/so/asdc/ASDCControllerSingleton.java @@ -15,6 +15,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. + * Modifications Copyright (C) 2018 IBM. * ============LICENSE_END========================================================= */ @@ -22,22 +23,25 @@ package org.onap.so.asdc; import javax.annotation.PreDestroy; +import org.onap.so.asdc.client.ASDCConfiguration; import org.onap.so.asdc.client.ASDCController; import org.onap.so.asdc.client.exceptions.ASDCControllerException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Profile; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; - +import org.onap.so.logger.MsoLogger; import java.security.SecureRandom; + @Component @Profile("!test") public class ASDCControllerSingleton { @Autowired - private ASDCController asdcController; + private ASDCController asdcController; + private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.ASDC, ASDCControllerSingleton.class); @@ -49,8 +53,8 @@ public class ASDCControllerSingleton { asdcController.setControllerName("mso-controller"+randomNumber); asdcController.initASDC(); } catch (ASDCControllerException e) { - // TODO Auto-generated catch block - e.printStackTrace(); + msoLogger.error(e); + } } @@ -59,8 +63,7 @@ public class ASDCControllerSingleton { try { asdcController.closeASDC (); } catch (ASDCControllerException e) { - // TODO Auto-generated catch block - e.printStackTrace(); + msoLogger.error(e); } } |