diff options
author | Sunder Tattavarada <statta@research.att.com> | 2020-07-07 17:08:17 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-07-07 17:08:17 +0000 |
commit | 749ef2748733dbac79e537f7ab1184950a307acc (patch) | |
tree | ff4bf891eddea5021f212b6fd30c127d6f51f99a | |
parent | 72b20ecd24344bd83617bb9ad2e943173356042f (diff) | |
parent | c041d462a680fa2cf58b00c0d85ab1e468f98269 (diff) |
Merge "lowered code smells in ReportLoader & ReportWrappe"
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 01e9f3f4..ae2e2184 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); |