Sonar Fix- ReportFormFields.java 21/92721/1
authordinesha <dineshgs@in.ibm.com>
Thu, 1 Aug 2019 09:17:59 +0000 (14:47 +0530)
committerManoop Talasila <talasila@research.att.com>
Mon, 5 Aug 2019 18:40:15 +0000 (18:40 +0000)
Fixed Sonar Issues accross the file

Issue-ID: PORTAL-686
Change-Id: I427688b57166ad06ad908b7ba093d8f2d9c811f9
Signed-off-by: dinesha <dineshgs@in.ibm.com>
(cherry picked from commit b5abb9ffb393d0ce78ce5799576935a8f5820022)

ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ReportFormFields.java

index 02a3de4..7bacd22 100644 (file)
@@ -90,7 +90,7 @@ public class ReportFormFields extends Vector {
                                //Calendar rangeEndDate = fft.getRangeEndDate().toGregorianCalendar(); 
                                String rangeStartDateSQL = fft.getRangeStartDateSQL(); 
                                String rangeEndDateSQL = fft.getRangeEndDateSQL(); 
-                               String user_id = AppUtils.getUserID(request);
+                               String userId = AppUtils.getUserID(request);
                                String multiSelectListSize = fft.getMultiSelectListSize();
                                
                                //s_logger.debug("ranges are : " + fft.getRangeStartDate() + fft.getRangeEndDate());
@@ -122,9 +122,9 @@ public class ReportFormFields extends Vector {
                        }
                        // }
                     }
-                    fieldSQL = Utils.replaceInString(fieldSQL, "[USERID]", user_id);
-                    fieldSQL = Utils.replaceInString(fieldSQL, "[USER_ID]", user_id);
-                    fieldSQL = Utils.replaceInString(fieldSQL, "[LOGGED_USERID]", user_id);
+                    fieldSQL = Utils.replaceInString(fieldSQL, "[USERID]", userId);
+                    fieldSQL = Utils.replaceInString(fieldSQL, "[USER_ID]", userId);
+                    fieldSQL = Utils.replaceInString(fieldSQL, "[LOGGED_USERID]", userId);
                     
                 }
 
@@ -152,9 +152,9 @@ public class ReportFormFields extends Vector {
                                fieldDefaultSQL = Utils.replaceInString(fieldDefaultSQL, "[" + sessionParameters[i].toUpperCase()+"]", (String)session.getAttribute(sessionParameters[i]) );   
                     }
                     
-                    fieldDefaultSQL = Utils.replaceInString(fieldDefaultSQL, "[USERID]", user_id);
-                    fieldDefaultSQL = Utils.replaceInString(fieldDefaultSQL, "[USER_ID]", user_id);
-                    fieldDefaultSQL = Utils.replaceInString(fieldDefaultSQL, "[LOGGED_USERID]", user_id);
+                    fieldDefaultSQL = Utils.replaceInString(fieldDefaultSQL, "[USERID]", userId);
+                    fieldDefaultSQL = Utils.replaceInString(fieldDefaultSQL, "[USER_ID]", userId);
+                    fieldDefaultSQL = Utils.replaceInString(fieldDefaultSQL, "[LOGGED_USERID]", userId);
                 }
                                //s_logger.debug("fieldSQL After" + fieldSQL);
                                if(rangeStartDateSQL!=null) {