diff options
author | 2020-05-06 19:11:11 +0000 | |
---|---|---|
committer | 2020-05-06 19:11:11 +0000 | |
commit | 8c18951c83e82faff1ce0051a5af320a91402c8e (patch) | |
tree | fa644eae0366862c288522f4ca2eecd0fc143247 /ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime | |
parent | 88d2cb0063364261052b64748374250295b9c531 (diff) | |
parent | 8b593147c3d890685184fd775157ef84f4df112e (diff) |
Merge "code smells removed"
Diffstat (limited to 'ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime')
3 files changed, 13 insertions, 13 deletions
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartD3Helper.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartD3Helper.java index 52077aa8..72769e3f 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartD3Helper.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartD3Helper.java @@ -393,7 +393,7 @@ public class ChartD3Helper { } // added to load all date elements - HashMap<String, HashMap<String, String>> dataSeriesMap = new HashMap<String, HashMap<String, String>>(); + HashMap<String, HashMap<String, String>> dataSeriesMap = new HashMap<>(); for (int i = 0; i < uniqueElements.length; i++) { if(multipleSeries && (nvl(chartRightAxisLabel).length() > 0)) @@ -427,9 +427,9 @@ public class ChartD3Helper { int formatFlag = 0; - TreeSet<String> dateStrList = new TreeSet<String>(); + TreeSet<String> dateStrList = new TreeSet<>(); // added to store all date elements - SortedSet<String> sortSet = new TreeSet<String>(); + SortedSet<String> sortSet = new TreeSet<>(); int count = 0; if(flag!= 1) { HashMap dataSeriesStrMap = new HashMap(); @@ -780,7 +780,7 @@ public class ChartD3Helper { for (int i = 0; i < uniqueElements.length; i++) { HashMap<String, String> dataMap = dataSeriesMap.get((String)uniqueElements[i]); Set<String> keySet = dataMap.keySet(); - ArrayList<String> keySortedList = new ArrayList<String>(new TreeSet<String>(keySet)); + ArrayList<String> keySortedList = new ArrayList<>(new TreeSet<String>(keySet)); for (int k=0; k < keySortedList.size(); k++) { valueStr = dataSeriesMap.get((String)uniqueElements[i]).get(keySortedList.get(k)); @@ -1723,7 +1723,7 @@ public class ChartD3Helper { double value = 0; int flagNull = 0; String COLOR = ""; - TreeSet<String> colorList = new TreeSet<String>(); + TreeSet<String> colorList = new TreeSet<>(); for (int i = 0; i < ds.getRowCount(); i++) { value = 0; try { @@ -1845,9 +1845,9 @@ public class ChartD3Helper { int formatFlag = 0; - TreeSet<String> dateStrList = new TreeSet<String>(); + TreeSet<String> dateStrList = new TreeSet<>(); // added to store all date elements - SortedSet<String> sortSet = new TreeSet<String>(); + SortedSet<String> sortSet = new TreeSet<>(); int count = 0; int flag = 0; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartJSONHelper.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartJSONHelper.java index 6003222b..0caca218 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartJSONHelper.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartJSONHelper.java @@ -417,7 +417,7 @@ public class ChartJSONHelper { List<DataColumnType> dcList = reportRuntime.getOnlyVisibleColumns(); int countIndex = 0; - ArrayList<ChartColumnJSON> chartColumnJSONList = new ArrayList<ChartColumnJSON>(); + ArrayList<ChartColumnJSON> chartColumnJSONList = new ArrayList<>(); for(Iterator iter = dcList.iterator(); iter.hasNext(); ) { ChartColumnJSON ccJSON = new ChartColumnJSON(); DataColumnType dc = (DataColumnType) iter.next(); @@ -484,7 +484,7 @@ public class ChartJSONHelper { if(chartValueCols.size() <= 0) { chartValueCols = reportCols; } - ArrayList<RangeAxisJSON> rangeAxisJSONList = new ArrayList<RangeAxisJSON>(); + ArrayList<RangeAxisJSON> rangeAxisJSONList = new ArrayList<>(); for (int k = 0; k < chartValueCols.size(); k++) { dct_RangeAxis = chartValueCols.get(k); RangeAxisJSON rangeAxisJSON = new RangeAxisJSON(); @@ -577,12 +577,12 @@ public class ChartJSONHelper { chartJSON.setMaxRange(reportRuntime.getRangeAxisUpperLimit()); if(showData) { - ArrayList<ArrayList<Row>> wholeList = new ArrayList<ArrayList<Row>>(); + ArrayList<ArrayList<Row>> wholeList = new ArrayList<>(); - ArrayList<Row> rowList = new ArrayList<Row>(); + ArrayList<Row> rowList = new ArrayList<>(); if(showData) { for (int i = 0; i < ds.getRowCount(); i++) { - rowList = new ArrayList<Row>(); + rowList = new ArrayList<>(); for (int j = 0; j<ds.getColumnCount(); j++) { Row row = new Row(); row.setColId(ds.getColumnName(j)); 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 73387b20..558f5f71 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 @@ -949,7 +949,7 @@ public class ReportRuntime extends ReportWrapper implements Cloneable, Serializa //Collections.sort((List)dataList, new DataRowComparable()); DataRow drInFor1 = null; Vector<DataValue> v1= null, v2 = null; - ArrayList<String> temp = new ArrayList<String>(); + ArrayList<String> temp = new ArrayList<>(); if (Globals.getMergeCrosstabRowHeadings()) { for (int i = 0; i < dataList.size(); i++) { drInFor1 = (DataRow)dataList.get(i); |