summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-analytics/src/main
diff options
context:
space:
mode:
authorIndrijeet kumar <indriku1@in.ibm.com>2020-05-07 09:24:11 +0530
committerIndrijeet Kumar <indriku1@in.ibm.com>2020-05-07 22:06:47 +0000
commitec7bb7e0c9d085e20bae603ff67e33f3aef0af7a (patch)
treedc90b399e5207952b2eef30c13f50936cb736b73 /ecomp-sdk/epsdk-analytics/src/main
parent8c18951c83e82faff1ce0051a5af320a91402c8e (diff)
lowered some code smells
lowered some code smells Issue-ID: PORTAL-813 Change-Id: Ie1a8136d352d267b8a452a3d33ddd3d544be23c0 Signed-off-by: Indrijeet Kumar <indriku1@in.ibm.com>
Diffstat (limited to 'ecomp-sdk/epsdk-analytics/src/main')
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/Utils.java11
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/ChartDrillOptions.java2
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/ColFilterList.java2
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DashboardEditorList.java2
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DashboardReports.java2
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DashboardReportsNew.java2
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DataColumnList.java2
7 files changed, 13 insertions, 10 deletions
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/Utils.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/Utils.java
index 416fbab7..16d6a899 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/Utils.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/Utils.java
@@ -246,7 +246,7 @@ public class Utils extends org.onap.portalsdk.analytics.RaptorObject {
Vector allUsers = AppUtils.getAllUsers(query,param, isAdmin);
Vector result = new Vector(allUsers.size());
- List<Item> resultLatest = new ArrayList<Item>();
+ List<Item> resultLatest = new ArrayList<>();
for (Iterator iter = allUsers.iterator(); iter.hasNext();) {
IdNameValue value = (IdNameValue) iter.next();
@@ -282,7 +282,7 @@ public class Utils extends org.onap.portalsdk.analytics.RaptorObject {
Vector allRoles = AppUtils.getAllRoles(query, param, isAdmin);
Vector result = new Vector(allRoles.size());
- List<Item> resultLatest = new ArrayList<Item>();
+ List<Item> resultLatest = new ArrayList<>();
for (Iterator iter = allRoles.iterator(); iter.hasNext();) {
IdNameValue value = (IdNameValue) iter.next();
@@ -357,11 +357,14 @@ public class Utils extends org.onap.portalsdk.analytics.RaptorObject {
int numberOfTimesLooped = 0;
boolean isSorted = false;
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
- Date date1 = null, date2 = null;
+ Date date1 = null;
+ Date date2 = null;
Date currDate = new Date();
Object[] matchingfileNamesArr = matchingFiles.toArray();
//System.out.println("SIZE " + matchingFiles.size());
- String fileName1 = "", fileName2 ="";
+ String fileName1 = "";
+ String fileName2 ="";
+
do {
isSorted = true;
for (int j = 1; j < matchingfileNamesArr.length - numberOfTimesLooped++; j++) {
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/ChartDrillOptions.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/ChartDrillOptions.java
index de8593a8..dfe91132 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/ChartDrillOptions.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/ChartDrillOptions.java
@@ -217,7 +217,7 @@ public class ChartDrillOptions {
*/
public List<ChartDrillFormfield> getTargetFormfield() {
if (targetFormfield == null) {
- targetFormfield = new ArrayList<ChartDrillFormfield>();
+ targetFormfield = new ArrayList<>();
}
return this.targetFormfield;
}
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/ColFilterList.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/ColFilterList.java
index 6a56d590..18cb0075 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/ColFilterList.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/ColFilterList.java
@@ -104,7 +104,7 @@ public class ColFilterList {
*/
public List<ColFilterType> getColFilter() {
if (colFilter == null) {
- colFilter = new ArrayList<ColFilterType>();
+ colFilter = new ArrayList<>();
}
return this.colFilter;
}
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DashboardEditorList.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DashboardEditorList.java
index b2b105f5..577b896c 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DashboardEditorList.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DashboardEditorList.java
@@ -104,7 +104,7 @@ public class DashboardEditorList {
*/
public List<DashboardEditorReport> getEditorList() {
if (editorList == null) {
- editorList = new ArrayList<DashboardEditorReport>();
+ editorList = new ArrayList<>();
}
return this.editorList;
}
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DashboardReports.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DashboardReports.java
index b4ef7389..8f1f1d2f 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DashboardReports.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DashboardReports.java
@@ -104,7 +104,7 @@ public class DashboardReports {
*/
public List<Reports> getReportsList() {
if (reportsList == null) {
- reportsList = new ArrayList<Reports>();
+ reportsList = new ArrayList<>();
}
return this.reportsList;
}
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DashboardReportsNew.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DashboardReportsNew.java
index 3eadf6f5..849aa651 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DashboardReportsNew.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DashboardReportsNew.java
@@ -110,7 +110,7 @@ public class DashboardReportsNew {
*/
public List<Reports> getReportsList() {
if (reportsList == null) {
- reportsList = new ArrayList<Reports>();
+ reportsList = new ArrayList<>();
}
return this.reportsList;
}
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DataColumnList.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DataColumnList.java
index dffce0e9..4d9ba5d9 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DataColumnList.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/xmlobj/DataColumnList.java
@@ -106,7 +106,7 @@ public class DataColumnList {
*/
public List<DataColumnType> getDataColumn() {
if (dataColumn == null) {
- dataColumn = new ArrayList<DataColumnType>();
+ dataColumn = new ArrayList<>();
}
return this.dataColumn;
}