diff options
author | 2020-05-07 08:49:13 +0530 | |
---|---|---|
committer | 2020-05-07 08:49:57 +0530 | |
commit | 1c6c6e4a8a1004c2086ca66dc13e8205f7492fee (patch) | |
tree | adaa73692f930155a6f6bc25c39a7bb0d2a73025 /ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model | |
parent | 8c18951c83e82faff1ce0051a5af320a91402c8e (diff) |
removed some code smells
removed some code smells
Issue-ID: PORTAL-813
Change-Id: I936676da6411bcb84ed61a646664f6df23aa2601
Signed-off-by: Indrijeet Kumar <indriku1@in.ibm.com>
Diffstat (limited to 'ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model')
2 files changed, 17 insertions, 17 deletions
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ReportRuntime.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ReportRuntime.java index 558f5f71..b6f944a7 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ReportRuntime.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ReportRuntime.java @@ -2684,12 +2684,12 @@ public List getMapMarkers(ReportData rd, org.onap.portalsdk.analytics.xmlobj.Rep reportJSONRuntime.setHideFormFieldsAfterRun(isHideFormFieldAfterRun()); reportJSONRuntime.setDisplayExcel(!isDisplayOptionHideExcelIcons()); reportJSONRuntime.setDisplayPDF(!isDisplayOptionHidePDFIcons()); - ArrayList<IdNameValue> formFieldValues = new ArrayList<IdNameValue>(); - ArrayList<FormFieldJSON> formFieldJSONList = new ArrayList<FormFieldJSON>(); + ArrayList<IdNameValue> formFieldValues = new ArrayList<>(); + ArrayList<FormFieldJSON> formFieldJSONList = new ArrayList<>(); if(getReportFormFields()!=null) { - formFieldJSONList = new ArrayList<FormFieldJSON>(getReportFormFields().size()); + formFieldJSONList = new ArrayList<>(getReportFormFields().size()); for (Iterator iter = getReportFormFields().iterator(); iter.hasNext();) { - formFieldValues = new ArrayList<IdNameValue>(); + formFieldValues = new ArrayList<>(); FormField ff = (FormField) iter.next(); ff.setDbInfo(getDbInfo()); FormFieldJSON ffJSON = new FormFieldJSON(); @@ -2789,8 +2789,8 @@ public List getMapMarkers(ReportData rd, org.onap.portalsdk.analytics.xmlobj.Rep if(rd!=null) { count = 0; reportJSONRuntime.setTotalRows(getReportDataSize()); - ArrayList<ColumnHeader> colList = new ArrayList<ColumnHeader>(); - ArrayList<Map<String,Object>> reportDataRows = new ArrayList<Map<String,Object>>(); + ArrayList<ColumnHeader> colList = new ArrayList<>(); + ArrayList<Map<String,Object>> reportDataRows = new ArrayList<>(); for(rd.reportColumnHeaderRows.resetNext(); rd.reportColumnHeaderRows.hasNext(); ) { count++; ColumnHeaderRow chr = rd.reportColumnHeaderRows.getNext(); @@ -2801,7 +2801,7 @@ public List getMapMarkers(ReportData rd, org.onap.portalsdk.analytics.xmlobj.Rep if(getReportDataSize() > 0) { count = 0; for(rd.reportDataRows.resetNext(); rd.reportDataRows.hasNext(); count++) { - dvJSON = new HashMap<String,Object>(); + dvJSON = new HashMap<>(); DataRow dr = rd.reportDataRows.getNext(); for(dr.resetNext(); dr.hasNext(); ) { DataValue dv = dr.getNext(); @@ -2840,12 +2840,12 @@ public List getMapMarkers(ReportData rd, org.onap.portalsdk.analytics.xmlobj.Rep reportJSONRuntime.setReportSubTitle(getReportSubTitle()); reportJSONRuntime.setAllowEdit(isAllowEdit(request)); reportJSONRuntime.setNumFormCols(getNumFormColsAsInt()); - ArrayList<IdNameValue> formFieldValues = new ArrayList<IdNameValue>(); - ArrayList<FormFieldJSON> formFieldJSONList = new ArrayList<FormFieldJSON>(); + ArrayList<IdNameValue> formFieldValues = new ArrayList<>(); + ArrayList<FormFieldJSON> formFieldJSONList = new ArrayList<>(); if(reportFormFields!=null) { - formFieldJSONList = new ArrayList<FormFieldJSON>(reportFormFields.size()); + formFieldJSONList = new ArrayList<>(reportFormFields.size()); for (Iterator iter = reportFormFields.iterator(); iter.hasNext();) { - formFieldValues = new ArrayList<IdNameValue>(); + formFieldValues = new ArrayList<>(); FormField ff = (FormField) iter.next(); FormFieldJSON ffJSON = new FormFieldJSON(); ffJSON.setFieldId(ff.getFieldName()); @@ -2858,7 +2858,7 @@ public List getMapMarkers(ReportData rd, org.onap.portalsdk.analytics.xmlobj.Rep formFieldJSONList.add(ffJSON); } for (Iterator iter = reportFormFields.iterator(); iter.hasNext();) { - formFieldValues = new ArrayList<IdNameValue>(); + formFieldValues = new ArrayList<>(); FormField ff = (FormField) iter.next(); ff.setDbInfo(getDbInfo()); for (Iterator iter1 = formFieldJSONList.iterator(); iter1.hasNext();) { @@ -2895,7 +2895,7 @@ public List getMapMarkers(ReportData rd, org.onap.portalsdk.analytics.xmlobj.Rep lookup.trimToSize(); String requestValue = request.getParameter(ff.getFieldName()); - ArrayList<String> requestValueList = new ArrayList<String>(); + ArrayList<String> requestValueList = new ArrayList<>(); requestValueList.add(requestValue); /*if(ff.isTriggerThisFormfield()) { @@ -2954,7 +2954,7 @@ public List getMapMarkers(ReportData rd, org.onap.portalsdk.analytics.xmlobj.Rep private String parseAndFillOtherFormfieldValues(HttpServletRequest request, String SQL, String userId, ArrayList<FormFieldJSON> formFieldJSONList) { - ArrayList<IdNameValue> formFieldValues = new ArrayList<IdNameValue>(); + ArrayList<IdNameValue> formFieldValues = new ArrayList<>(); String selectedValue = ""; String displayName = ""; for (Iterator iter1 = formFieldJSONList.iterator(); iter1.hasNext();) { @@ -3028,7 +3028,7 @@ public String parseAndFillWithCurrentValues(HttpServletRequest request, String s String fieldId = fft.getFieldId(); String fieldDisplay = getFormFieldDisplayName(fft); String formfield_value = ""; - List<String> selectedItems = new ArrayList<String>(); + List<String> selectedItems = new ArrayList<>(); //Added so that Combo Box in old RAPTOR definition is translated to List box if(fft.getFieldType().equals(FormField.FFT_COMBO_BOX)) { fft.setFieldType(FormField.FFT_LIST_BOX); diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/search/SearchResultJSON.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/search/SearchResultJSON.java index 3148d277..586ec580 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/search/SearchResultJSON.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/search/SearchResultJSON.java @@ -41,9 +41,9 @@ import java.util.ArrayList; public class SearchResultJSON{ - public ArrayList<SearchResultColumn> searchResultColumns = new ArrayList<SearchResultColumn>(); + public ArrayList<SearchResultColumn> searchResultColumns = new ArrayList<>(); - public ArrayList<SearchResultRow> searchResultRows = new ArrayList<SearchResultRow>(); + public ArrayList<SearchResultRow> searchResultRows = new ArrayList<>(); |