summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-analytics/src
diff options
context:
space:
mode:
authorIndrijeet kumar <indriku1@in.ibm.com>2020-06-09 09:50:32 +0530
committerIndrijeet kumar <indriku1@in.ibm.com>2020-06-09 09:50:43 +0530
commitc041d462a680fa2cf58b00c0d85ab1e468f98269 (patch)
tree32fb191e803ff0bb2c534cafa8fd91524f08b23f /ecomp-sdk/epsdk-analytics/src
parent6d48b04c34a009323b92b23efc507c63e40b1d87 (diff)
lowered code smells in ReportLoader & ReportWrappe
lowered code smells in ReportLoader & ReportWrapper Issue-ID: PORTAL-813 Change-Id: I0c1452bc1097e28943ad0497e493517b957b0059 Signed-off-by: Indrijeet Kumar <indriku1@in.ibm.com>
Diffstat (limited to 'ecomp-sdk/epsdk-analytics/src')
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/ReportLoader.java13
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/ReportWrapper.java3
2 files changed, 1 insertions, 15 deletions
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/ReportLoader.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/ReportLoader.java
index a92d5244..ed90ce50 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/ReportLoader.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/ReportLoader.java
@@ -142,12 +142,6 @@ public class ReportLoader extends org.onap.portalsdk.analytics.RaptorObject {
} else
throw new RaptorException("Report " + reportID + NOT_FOUND_IN_DB);
} else {
- /*
- * oracle.sql.CLOB clob = null; if (rs.next()) clob = (oracle.sql.CLOB) rs.getObject(1); else throw
- * new RaptorException("Report " + reportID + NOT_FOUND_IN_DB); int len = 0; char[] buffer = new
- * char[512]; Reader in = clob.getCharacterStream(); while ((len = in.read(buffer)) != -1)
- * sb.append(buffer, 0, len); in.close();
- */
throw new RaptorException("only maria db support for this ");
}
}
@@ -207,13 +201,6 @@ public class ReportLoader extends org.onap.portalsdk.analytics.RaptorObject {
}
} else {
- /*
- * oracle.sql.CLOB clob = null; if (rs.next()) clob = (oracle.sql.CLOB) rs.getObject(2); else throw
- * new RaptorException("Report " + reportID + NOT_FOUND_IN_DB);
- *
- * if (clob.length() > reportXML.length()) clob.trim(reportXML.length()); out =
- * clob.getCharacterOutputStream();
- */
throw new RaptorException("only maria db support for this ");
}
/*
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/ReportWrapper.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/ReportWrapper.java
index 8c95d71a..35509900 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/ReportWrapper.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/ReportWrapper.java
@@ -3929,7 +3929,7 @@ public class ReportWrapper extends org.onap.portalsdk.analytics.RaptorObject {
if (reportSQL.indexOf("FROM", pos) != -1) {
pos = reportSQL.indexOf("FROM", pos);
pos_dup_select = reportSQL.lastIndexOf("SELECT", pos);
- pos_first_select = reportSQL.indexOf("SELECT");// ,pos);
+ pos_first_select = reportSQL.indexOf("SELECT");
logger.debug(EELFLoggerDelegate.debugLogger, ("pos_select " + pos_first_select + " " + pos_dup_select));
if (pos_dup_select > pos_first_select) {
logger.debug(EELFLoggerDelegate.debugLogger, ("********pos_dup_select ********" + pos_dup_select));
@@ -4274,7 +4274,6 @@ public class ReportWrapper extends org.onap.portalsdk.analytics.RaptorObject {
cr.setPublic(false);
cr.setCreateId(createID);
cr.setCreateDate(DatatypeFactory.newInstance().newXMLGregorianCalendar(new GregorianCalendar()));
- // cr.setReportSQL("");
cr.setReportType("");
cr.setPageSize(50);