Removed code smell 49/106749/3
authorezhil <ezhrajam@in.ibm.com>
Tue, 28 Apr 2020 14:04:24 +0000 (19:34 +0530)
committerEzhilarasi R <ezhrajam@in.ibm.com>
Wed, 29 Apr 2020 06:57:38 +0000 (06:57 +0000)
Issue-ID: PORTAL-865
Change-Id: I024f091a30ef174458795ab4fb7843f58607ade1
Signed-off-by: ezhil <ezhrajam@in.ibm.com>
ecomp-portal-BE-common/src/main/java/org/onap/portalapp/music/conf/MusicSessionRepositoryHandler.java

index 46f96d6..12deabe 100644 (file)
@@ -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 {