diff options
author | 2020-09-14 18:59:18 +0000 | |
---|---|---|
committer | 2020-09-14 18:59:18 +0000 | |
commit | 6939f17219cd9ee1f5ceb254f866ff73c79d7f9f (patch) | |
tree | 9ddeac327c45a0b74f8f08621734259d20f47840 /ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/ReportWrapper.java | |
parent | 40101982758fd0ac3f4ad3916c8a2aed52af0653 (diff) | |
parent | c7cdb80d8e7ac1ea8aaaa9e5875ad1071af07440 (diff) |
Merge "NPE issue fix"
Diffstat (limited to 'ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/ReportWrapper.java')
-rw-r--r-- | ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/ReportWrapper.java | 29 |
1 files changed, 17 insertions, 12 deletions
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 c5bb9c5b..27ad62f9 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 @@ -183,10 +183,9 @@ public class ReportWrapper extends org.onap.portalsdk.analytics.RaptorObject imp protected String reportSQLOnlyFirstPart = null; - - public ReportWrapper() { - super(); - } + public ReportWrapper() { + super(); + } private ReportWrapper(CustomReportType cr, String reportID, ReportSecurity reportSecurity) { super(); @@ -246,7 +245,8 @@ public class ReportWrapper extends org.onap.portalsdk.analytics.RaptorObject imp reportSecurity = new ReportSecurity(reportID, ownerID, createID, createDate, updateID, updateDate, cr.isPublic()); - } + } // ReportWrapper + public CustomReportType getCustomReport() { return cr; } @@ -1281,7 +1281,7 @@ public class ReportWrapper extends org.onap.portalsdk.analytics.RaptorObject imp if (cr.getDashBoardReportsNew() == null) addDashboardReportsNew(new ObjectFactory()); } catch (RaptorException ex) { - ex.printStackTrace(); + logger.error(EELFLoggerDelegate.debugLogger, "Exception occured in getDashBoardReportsNew ", ex); } return cr.getDashBoardReportsNew(); } @@ -1940,7 +1940,6 @@ public class ReportWrapper extends org.onap.portalsdk.analytics.RaptorObject imp String chartGroup = chartGroupName.substring(0, chartGroupName.lastIndexOf("|")); int flag = 0; for (Iterator iter = reportCols.iterator(); iter.hasNext();) { - flag = 0; DataColumnType dc = (DataColumnType) iter.next(); flag = getDependsOnFormFieldFlag(dc, formValues); @@ -3169,14 +3168,19 @@ public class ReportWrapper extends org.onap.portalsdk.analytics.RaptorObject imp } } } - if (nvl(fieldValue).length() == 0) + + // End + if (nvl(fieldValue).length() == 0) { + // Does not append filter with missing form + // field argument applyFilter = false; - else if (isMultiValue || "IN".equals(nvl(cf.getExpression())) - || "NOT IN".equals(nvl(cf.getExpression()))) + } else if (isMultiValue || "IN".equals(nvl(cf.getExpression())) + || "NOT IN".equals(nvl(cf.getExpression()))) { curFilter.append(formatListValue(fieldValue, dc, true, usePipeDelimiterOnly)); - else - curFilter.append(formatValue(fieldValue, dc, true, null, fft)); + } else { + curFilter.append(formatValue(fieldValue, dc, true, getColumnTableById(dc.getColId()), fft)); + } } // else curFilter.append(nvl(cf.getCloseBrackets())); @@ -4281,6 +4285,7 @@ public class ReportWrapper extends org.onap.portalsdk.analytics.RaptorObject imp DataSourceList dataSourceList = objFactory.createDataSourceList(); cr.setDataSourceList(dataSourceList); } catch (DatatypeConfigurationException ex) { + logger.error(EELFLoggerDelegate.debugLogger, "Exception occured in createBlankCR ", ex); throw new RaptorException(ex.getMessage(), ex.getCause()); } return cr; |