diff options
author | Indrijeet kumar <indriku1@in.ibm.com> | 2020-05-21 11:23:08 +0530 |
---|---|---|
committer | Indrijeet kumar <indriku1@in.ibm.com> | 2020-05-21 11:23:14 +0530 |
commit | 91bd8f3aff7086af5d8f15046532f4499079d6d8 (patch) | |
tree | 1eb70b30ed62ca3b2c861e5612d6517a116b4f8d | |
parent | 2053ff0eaa2e4d1efcdb56a953af7c631757369e (diff) |
reduced code smells in some components
reduced code smells in some components
Issue-ID: PORTAL-813
Change-Id: I9a003165d260fd332e2e5199525412aeeb9fff05
Signed-off-by: Indrijeet Kumar <indriku1@in.ibm.com>
7 files changed, 4 insertions, 17 deletions
diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/util/PortalApiConstants.java b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/util/PortalApiConstants.java index 1b86af2e..764f725d 100644 --- a/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/util/PortalApiConstants.java +++ b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/util/PortalApiConstants.java @@ -68,7 +68,7 @@ public interface PortalApiConstants { public static final String UEB_APP_INBOUND_MAILBOX_NAME = "ueb_app_mailbox_name"; public static final String UEB_APP_CONSUMER_GROUP_NAME = "ueb_app_consumer_group_name"; - // UebManager generates a consumer group name for special token {UUID} + /* UebManager generates a consumer group name for special token {UUID} */ public static final String UEB_APP_CONSUMER_GROUP_NAME_GENERATOR = "{UUID}"; public static final String UEB_APP_KEY = "ueb_app_key"; public static final String UEB_APP_SECRET = "ueb_app_secret"; diff --git a/ecomp-sdk/epsdk-logger/src/main/java/org/onap/portalsdk/core/logging/format/ErrorCodesEnum.java b/ecomp-sdk/epsdk-logger/src/main/java/org/onap/portalsdk/core/logging/format/ErrorCodesEnum.java index 6f473efe..c05c2dc8 100644 --- a/ecomp-sdk/epsdk-logger/src/main/java/org/onap/portalsdk/core/logging/format/ErrorCodesEnum.java +++ b/ecomp-sdk/epsdk-logger/src/main/java/org/onap/portalsdk/core/logging/format/ErrorCodesEnum.java @@ -38,7 +38,6 @@ package org.onap.portalsdk.core.logging.format; import com.att.eelf.i18n.EELFResolvableErrorEnum; -//import com.att.eelf.i18n.EELFResourceManager; public enum ErrorCodesEnum implements EELFResolvableErrorEnum { BERESTAPIAUTHENTICATIONERROR, BEHTTPCONNECTIONERROR_ONE_ARGUMENT, BEUEBAUTHENTICATIONERROR_ONE_ARGUMENT, diff --git a/ecomp-sdk/epsdk-logger/src/main/java/org/onap/portalsdk/core/logging/logic/EELFLoggerDelegate.java b/ecomp-sdk/epsdk-logger/src/main/java/org/onap/portalsdk/core/logging/logic/EELFLoggerDelegate.java index e59a0cc0..901c6737 100644 --- a/ecomp-sdk/epsdk-logger/src/main/java/org/onap/portalsdk/core/logging/logic/EELFLoggerDelegate.java +++ b/ecomp-sdk/epsdk-logger/src/main/java/org/onap/portalsdk/core/logging/logic/EELFLoggerDelegate.java @@ -65,17 +65,12 @@ import com.att.eelf.configuration.SLF4jWrapper; public class EELFLoggerDelegate extends SLF4jWrapper implements EELFLogger { - - //public static final EELFLogger errorLogger = EELFManager.getInstance().getErrorLogger(); public static final EELFLogger errorLogger = EELFManager.getInstance().getLogger("EELFError"); public static final EELFLogger metricsLogger = EELFManager.getInstance().getLogger("EELFMetrics"); public static final EELFLogger auditLogger = EELFManager.getInstance().getLogger("EELFAudit"); public static final EELFLogger applicationLogger = EELFManager.getInstance().getApplicationLogger(); - //public static final EELFLogger auditLogger = EELFManager.getInstance().getAuditLogger(); - //public static final EELFLogger metricsLogger = EELFManager.getInstance().getMetricsLogger(); public static final EELFLogger debugLogger = EELFManager.getInstance().getDebugLogger(); - // DateTime Format according to the ECOMP Application Logging Guidelines. - private static final SimpleDateFormat ecompLogDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX"); + private static final SimpleDateFormat ecompLogDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX"); private String className; diff --git a/ecomp-sdk/epsdk-logger/src/main/java/org/onap/portalsdk/core/logging/logic/LoggerProperties.java b/ecomp-sdk/epsdk-logger/src/main/java/org/onap/portalsdk/core/logging/logic/LoggerProperties.java index e5af757a..abd98b19 100644 --- a/ecomp-sdk/epsdk-logger/src/main/java/org/onap/portalsdk/core/logging/logic/LoggerProperties.java +++ b/ecomp-sdk/epsdk-logger/src/main/java/org/onap/portalsdk/core/logging/logic/LoggerProperties.java @@ -78,8 +78,6 @@ public class LoggerProperties { private static String propertyFileName = "logger.properties"; private static final Object lockObject = new Object(); - -// private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(LoggerProperties.class); /** * Gets the property value for the specified key. If a value is found, leading @@ -95,11 +93,9 @@ public class LoggerProperties { synchronized (lockObject) { try { if (!initialize()) { -// logger.error(EELFLoggerDelegate.errorLogger, "Failed to read property file " + propertyFileName); return null; } } catch (IOException e) { -// logger.error(EELFLoggerDelegate.errorLogger, "Failed to read property file " + propertyFileName ,e); return null; } } diff --git a/ecomp-sdk/epsdk-music/src/main/java/org/onap/portalapp/music/conf/MusicSession.java b/ecomp-sdk/epsdk-music/src/main/java/org/onap/portalapp/music/conf/MusicSession.java index ca60d398..ee585a79 100644 --- a/ecomp-sdk/epsdk-music/src/main/java/org/onap/portalapp/music/conf/MusicSession.java +++ b/ecomp-sdk/epsdk-music/src/main/java/org/onap/portalapp/music/conf/MusicSession.java @@ -38,7 +38,7 @@ /* * Copyright 2014-2017 the original author or authors. * - * Licensed under the Apache License, Version 2.0 (the "License"); + * Licensed under the Apache License, Version 2.0 (the "License") * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * @@ -338,7 +338,6 @@ public final class MusicSession implements Session, Serializable { * @param creationTime the time that this {@link Session} was created. */ public void setCreationTime(Instant creationTime) { - //MusicService musicService = new MusicService(); this.creationTime = creationTime; try{ MusicService.setAttribute(MusicProperties.CREATION_TIME, creationTime, this.id); diff --git a/ecomp-sdk/epsdk-music/src/main/java/org/onap/portalapp/music/conf/MusicSessionRepository.java b/ecomp-sdk/epsdk-music/src/main/java/org/onap/portalapp/music/conf/MusicSessionRepository.java index f2f8fee5..54750644 100644 --- a/ecomp-sdk/epsdk-music/src/main/java/org/onap/portalapp/music/conf/MusicSessionRepository.java +++ b/ecomp-sdk/epsdk-music/src/main/java/org/onap/portalapp/music/conf/MusicSessionRepository.java @@ -100,7 +100,6 @@ public class MusicSessionRepository implements SessionRepository<MusicSession> this.sessionHandler.remove(session.getOriginalId()); session.setOriginalId(session.getId()); } - // this.sessionHandler.put(session.getId(), new MusicSession(session)); this.sessionHandler.put(session.getId(), new MusicSession(session)); } @@ -114,7 +113,6 @@ public class MusicSessionRepository implements SessionRepository<MusicSession> deleteById(saved.getId()); return null; } - //return sessionHandler.session(saved); return new MusicSession(saved); } diff --git a/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/models/Workflow.java b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/models/Workflow.java index 81521176..aa9ac4ff 100644 --- a/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/models/Workflow.java +++ b/ecomp-sdk/epsdk-workflow/src/main/java/org/onap/portalsdk/workflow/models/Workflow.java @@ -7,7 +7,7 @@ * =================================================================== * * Unless otherwise specified, all software contained herein is licensed - * under the Apache License, Version 2.0 (the "License"); + * under the Apache License, Version 2.0 (the "License") * you may not use this software except in compliance with the License. * You may obtain a copy of the License at * |