Merge "Fixed sonar issue of EPFusionBaseController.java"
authorManoop Talasila <talasila@research.att.com>
Thu, 7 Feb 2019 21:35:59 +0000 (21:35 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 7 Feb 2019 21:35:59 +0000 (21:35 +0000)
ecomp-portal-BE-common/src/main/java/org/onap/portalapp/config/NotificationCleanupConfig.java
ecomp-portal-BE-common/src/main/java/org/onap/portalapp/controller/EPFusionBaseController.java
ecomp-portal-BE-common/src/main/java/org/onap/portalapp/controller/sessionmgt/SessionCommunicationController.java
ecomp-portal-BE-os/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java
ecomp-portal-BE-os/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java
ecomp-portal-BE-os/src/main/java/org/onap/portalapp/controller/PeerBroadcastSocket.java

index b9f4649..f18dea9 100644 (file)
@@ -3,8 +3,9 @@
  * ONAP Portal
  * ===================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ *
  * 
- * Modifications Copyright (C) 2018 IBM.
+ * Modifications Copyright © 2018 IBM.
  * ===================================================================
  *
  * Unless otherwise specified, all software contained herein is licensed
  */
 package org.onap.portalapp.config;
 
-import java.util.Timer;
-import java.util.TimerTask;
-
-import javax.annotation.PostConstruct;
-
-import org.springframework.beans.BeansException;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.ApplicationContextAware;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 
+import javax.annotation.PostConstruct;
+import java.util.Timer;
+import java.util.TimerTask;
+
 @Configuration
 public class NotificationCleanupConfig implements ApplicationContextAware {
        
index 49247d1..05dc3c9 100644 (file)
@@ -77,7 +77,7 @@ public abstract class EPFusionBaseController extends FusionBaseController {
        @ModelAttribute("menu")
        public Map<String, Object> messages(HttpServletRequest request) {
                HttpSession session = null;
-               Map<String, Object> model = new HashMap<String, Object>();
+               Map<String, Object> model = new HashMap<>();
                session = request.getSession();
                EPUser user = EPUserUtils.getUserSession(request);
                if (session != null && user != null) {
@@ -94,20 +94,21 @@ public abstract class EPFusionBaseController extends FusionBaseController {
                return model;
        }
 
+       @Override
        public Map<String, Object> setMenu(Set<MenuData> menuResult) throws Exception {
                ObjectMapper mapper = new ObjectMapper();
-               List<List<MenuData>> childItemList = new ArrayList<List<MenuData>>();
+               List<List<MenuData>> childItemList = new ArrayList<>();
                
-               List<MenuData> parentList = new ArrayList<MenuData>();
+               List<MenuData> parentList = new ArrayList<>();
                
-               Map<String, Object> model = new HashMap<String, Object>();
+               Map<String, Object> model = new HashMap<>();
                for (MenuData menu : menuResult) {
                        MenuData parentData = new MenuData();
                        parentData.setLabel(menu.getLabel());
                        parentData.setAction(menu.getAction());
                        parentData.setImageSrc(menu.getImageSrc());
                        parentList.add(parentData);
-                       List<MenuData> tempList = new ArrayList<MenuData>();
+                       List<MenuData> tempList = new ArrayList<>();
                        for (Object o : menu.getChildMenus()) {
                                MenuData m = (MenuData) o;
                                MenuData data = new MenuData();
index 4690328..d36cf6c 100644 (file)
@@ -3,6 +3,8 @@
  * ONAP Portal
  * ===================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ *
+ * Modifications Copyright (C) 2019 IBM.
  * ===================================================================
  *
  * Unless otherwise specified, all software contained herein is licensed
@@ -81,7 +83,7 @@ public class SessionCommunicationController  extends EPRestrictedRESTfulBaseCont
        @ApiOperation(value = "Extends session timeout values for all on-boarded applications.",
     response = Boolean.class)
        @RequestMapping(value={"/extendSessionTimeOuts"}, method = RequestMethod.POST)
-       public Boolean extendSessionTimeOuts(HttpServletRequest request, HttpServletResponse response, @RequestParam String sessionMap) throws Exception {
+       public Boolean extendSessionTimeOuts(HttpServletRequest request, HttpServletResponse response, @RequestParam String sessionMap) {
                manageService.extendSessionTimeOuts(sessionMap);
                
                return true;
index ac7c3f7..862bf39 100644 (file)
@@ -3,6 +3,8 @@
  * ONAP Portal
  * ===================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ *
+ * Modifications Copyright © 2018 IBM.
  * ===================================================================
  *
  * Unless otherwise specified, all software contained herein is licensed
@@ -220,10 +222,6 @@ public class ExternalAppConfig extends AppConfig implements Configurable {
                }
        }
 
-       public DataAccessService dataAccessService() {
-               return super.dataAccessService();
-       }
-
        @Override
        public String[] tileDefinitions() {
                return super.tileDefinitions();
index 10f8ec0..874f0bd 100644 (file)
@@ -3,6 +3,8 @@
  * ONAP Portal
  * ===================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ *
+ * Modifications Copyright © 2018 IBM.
  * ===================================================================
  *
  * Unless otherwise specified, all software contained herein is licensed
@@ -60,15 +62,7 @@ public class ExternalAppInitializer extends  AppInitializer{
         a[a.length - 1] = e;
         return a;
     }
-  
-    /*
-     * URL request will direct to the Spring dispatcher for processing
-     */
-    @Override
-    protected String[] getServletMappings() {
-       return super.getServletMappings();
-    }
+    
 }
 
 
index efad3c6..cbc3433 100644 (file)
@@ -3,6 +3,8 @@
  * ONAP Portal
  * ===================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ *
+ * Modifications Copyright (C) 2019 IBM.
  * ===================================================================
  *
  * Unless otherwise specified, all software contained herein is licensed
@@ -55,7 +57,7 @@ public class PeerBroadcastSocket {
 
        EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PeerBroadcastSocket.class);
 
-       public static Map<String, Object> channelMap = new Hashtable<String, Object>();
+       public final static Map<String, Object> channelMap = new Hashtable<String, Object>();
        public Map<String, String> sessionMap = new Hashtable<String, String>();
        ObjectMapper mapper = new ObjectMapper();