Merge "removed code smells"
[portal.git] / ecomp-portal-BE-common / src / main / java / org / onap / portalapp / portal / controller / FunctionalMenuController.java
index abbd854..3442d5a 100644 (file)
@@ -83,12 +83,10 @@ import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.EnableAspectJAutoProxy;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.PutMapping;
 import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
@@ -583,8 +581,12 @@ public class FunctionalMenuController extends EPRestrictedBaseController {
                        isSystemUser = user.isSystemUser();
                        emailStr = user.getEmail();
                        if (emailStr == null || emailStr.equals("")) {
-                               EPUser userResult = searchService.searchUserByUserId(orgUserIdStr);
-                               emailStr = userResult.getEmail();
+                               try {
+                                       EPUser userResult = searchService.searchUserByUserId(orgUserIdStr);
+                                       emailStr = userResult.getEmail();
+                               }catch(Exception ex) { 
+                                       logger.error(EELFLoggerDelegate.errorLogger, "searchUserByUserId call failed", ex); 
+                               } 
                        }
                        SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy hh:mm:ss Z a");
                        Date lastLoginDate = user.getLastLoginDate();