From: ezhil Date: Tue, 28 Apr 2020 14:04:24 +0000 (+0530) Subject: Removed code smell X-Git-Tag: 3.4.0~95 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=portal.git;a=commitdiff_plain;h=d97095ffd8dc352a4eb13ec32472453afbea3f32 Removed code smell Issue-ID: PORTAL-865 Change-Id: I024f091a30ef174458795ab4fb7843f58607ade1 Signed-off-by: ezhil --- diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/music/conf/MusicSessionRepositoryHandler.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/music/conf/MusicSessionRepositoryHandler.java index 46f96d66..12deabe3 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/music/conf/MusicSessionRepositoryHandler.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/music/conf/MusicSessionRepositoryHandler.java @@ -4,6 +4,8 @@ * =================================================================== * Copyright © 2018 AT&T Intellectual Property. All rights reserved. * =================================================================== + * Modifications Copyright (c) 2020 IBM + * =================================================================== * * Unless otherwise specified, all software contained herein is licensed * under the Apache License, Version 2.0 (the "License"); @@ -55,12 +57,11 @@ public class MusicSessionRepositoryHandler { public Session get(String id) { if(musicCache){ - // todo need to add the clean up for "sessions" map if musicCache is enabled + // need to add the clean up for "sessions" map if musicCache is enabled return this.sessions.get(id); }else{ try { - Session session = MusicService.getMetaAttribute(id); - return session; + return MusicService.getMetaAttribute(id); } catch (Exception e) { logger.error(EELFLoggerDelegate.errorLogger, "get failed with id " + id, e); return null; @@ -72,7 +73,7 @@ public class MusicSessionRepositoryHandler { public void remove(String id) { if(musicCache){ - // todo need to add the clean up for "sessions" map if musicCache is enabled + // need to add the clean up for "sessions" map if musicCache is enabled sessions.remove(id); }else{ try { @@ -87,7 +88,7 @@ public class MusicSessionRepositoryHandler { public void put(String id, MusicSession musicSession) { if(musicCache){ - // todo need to add the clean up for "sessions" map if musicCache is enabled + //need to add the clean up for "sessions" map if musicCache is enabled sessions.put(id, musicSession); }else{ try {