From 7af2403dd9a6c95b12efec59e60d47125dc8e286 Mon Sep 17 00:00:00 2001 From: st398c Date: Fri, 14 Jun 2019 14:36:53 -0400 Subject: Blackduck scan fixes Issue-ID: PORTAL-631 Change-Id: I1a09436f606831378b7f2a6211b1199ab830e06e Signed-off-by: st398c --- ecomp-sdk/epsdk-analytics/pom.xml | 8 ++--- .../portalsdk/analytics/model/ReportHandler.java | 38 +++++++++++----------- 2 files changed, 23 insertions(+), 23 deletions(-) (limited to 'ecomp-sdk/epsdk-analytics') diff --git a/ecomp-sdk/epsdk-analytics/pom.xml b/ecomp-sdk/epsdk-analytics/pom.xml index 4480a314..26a0c134 100644 --- a/ecomp-sdk/epsdk-analytics/pom.xml +++ b/ecomp-sdk/epsdk-analytics/pom.xml @@ -116,7 +116,7 @@ org.apache.poi poi - 3.5-FINAL + 3.14 commons-logging @@ -131,7 +131,7 @@ org.apache.poi poi-ooxml - 3.5-FINAL + 3.14 commons-logging @@ -146,7 +146,7 @@ org.apache.poi poi-scratchpad - 3.5-FINAL + 3.14 commons-logging @@ -161,7 +161,7 @@ org.apache.poi poi-contrib - 3.5-FINAL + 3.6 commons-logging diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/ReportHandler.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/ReportHandler.java index 00e9dfea..1bbfe297 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/ReportHandler.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/ReportHandler.java @@ -403,7 +403,7 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject { if(paramSeq <= 1) { row = sheet.createRow(++rowNum); cell = row.createCell((short) 0); - sheet.addMergedRegion(new Region(rowNum, s1, rowNum, s2)); + sheet.addMergedRegion(new CellRangeAddress(rowNum, rowNum, s1, s2)); cellDescr = row.createCell((short) 0); cellDescr.setCellValue("Run-time Parameters"); cellDescr.setCellStyle(styleDescription); @@ -453,7 +453,7 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject { //System.out.println("|"+s+"|"); row = sheet.createRow(++rowNum); cell = row.createCell((short) 0); - sheet.addMergedRegion(new Region(rowNum, s1, rowNum, s2)); + sheet.addMergedRegion(new CellRangeAddress(rowNum, rowNum, s1, s2)); cellDescr = row.createCell((short) 0); cellDescr.setCellValue("Run-time Parameters"); cellDescr.setCellStyle(styleDescription); @@ -550,7 +550,7 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject { row = sheet.createRow((short) ++rowNum); cellNum = 0; cell = row.createCell((short) cellNum); - sheet.addMergedRegion(new Region(rowNum, s1, rowNum, s2)); + sheet.addMergedRegion(new CellRangeAddress(rowNum, rowNum, s1, s2)); cell.setCellValue(strip.stripHtml(customizedParamInfo)); } */ @@ -652,12 +652,12 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject { HSSFRow row = sheet.createRow(rowNum); cellNum = 0; row.createCell((short) cellNum).setCellValue(header); - sheet.addMergedRegion(new Region(rowNum, (short) cellNum, rowNum, (short) (columnRows))); + sheet.addMergedRegion(new CellRangeAddress(rowNum, rowNum, (short) cellNum, (short) (columnRows))); rowNum += 1; row = sheet.createRow(rowNum); cellNum = 0; row.createCell((short) cellNum).setCellValue(subtitle); - sheet.addMergedRegion(new Region(rowNum, (short) cellNum, rowNum, (short) (columnRows))); + sheet.addMergedRegion(new CellRangeAddress(rowNum, rowNum, (short) cellNum, (short) (columnRows))); rowNum += 1; } @@ -687,7 +687,7 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject { title = Utils.replaceInString(title,"_nl_", " \n"); row.createCell((short) cellNum).setCellValue(title); //commented after bug reported by EPAT 01/17/2015 - //sheet.addMergedRegion(new Region(rowNum, (short) cellNum, rowNum+columnRows, (short) (cellNum))); + //sheet.addMergedRegion(new CellRangeAddress(rowNum, rowNum+columnRows, (short) cellNum, (short) (cellNum))); //System.out.println(" **************** Row Header Title " + rhc.getColumnTitle() + " " + cellNum + " " ); //System.out.println(cellNum + " " + cellWidth.size()); if (cellWidth.size() > 0 && cellWidth.size() > cellNum) { @@ -744,7 +744,7 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject { for ( int k = 1; k <= colSpan; k++ ) { row.createCell((short) cellNum+k); } - sheet.addMergedRegion(new Region(rowNum, (short) cellNum, rowNum, (short) (cellNum+colSpan))); + sheet.addMergedRegion(new CellRangeAddress(rowNum, rowNum, (short) cellNum, (short) (cellNum+colSpan))); } @@ -1659,7 +1659,7 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject { cellNum = 0; String disclaimer = Globals.getFooterFirstLine() + " " + Globals.getFooterSecondLine(); row.createCell((short) cellNum).setCellValue(disclaimer); - sheet.addMergedRegion(new Region(rowNum, (short) cellNum, rowNum, (short) (columnRows))); + sheet.addMergedRegion(new CellRangeAddress(rowNum, rowNum, (short) cellNum, (short) (columnRows))); rowNum += 1; }*/ } else { @@ -2621,8 +2621,8 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject { row = sheet.createRow(rowNum); cellNum = 0; row.createCell((short) cellNum).setCellValue(footer); - sheet.addMergedRegion(new Region(rowNum, (short) cellNum, rowNum, (short) (columnRows))); - //sheet.addMergedRegion(new Region(rowNum, (short) cellNum, rowNum+columnRows, (short) (cellNum))); + sheet.addMergedRegion(new CellRangeAddress(rowNum, rowNum, (short) cellNum, (short) (columnRows))); + //sheet.addMergedRegion(new CellRangeAddress(rowNum, rowNum+columnRows, (short) cellNum, (short) (cellNum))); rowNum += 1; } @@ -2633,7 +2633,7 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject { cellNum = 0; String disclaimer = Globals.getFooterFirstLine() + " " + Globals.getFooterSecondLine(); row.createCell((short) cellNum).setCellValue(disclaimer); - sheet.addMergedRegion(new Region(rowNum, (short) cellNum, rowNum, (short) (columnRows))); + sheet.addMergedRegion(new CellRangeAddress(rowNum, rowNum, (short) cellNum, (short) (columnRows))); rowNum += 1; } @@ -2652,7 +2652,7 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject { String reportDescr, HSSFSheet sheet) { short s1 = 0, s2 = (short) (col-1); rowNum += 1; - sheet.addMergedRegion(new Region(rowNum, s1, rowNum, s2)); + sheet.addMergedRegion(new CellRangeAddress(rowNum, rowNum, s1, s2)); HSSFRow row = null, row1 = null; row = sheet.createRow(rowNum); @@ -2676,7 +2676,7 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject { // Report Description if (Globals.getShowDescrAtRuntime() && nvl(reportDescr).length() > 0) { rowNum += 1; - sheet.addMergedRegion(new Region(rowNum, s1, rowNum, s2)); + sheet.addMergedRegion(new CellRangeAddress(rowNum, rowNum, s1, s2)); HSSFCellStyle styleDescription = wb.createCellStyle(); styleDescription.setAlignment(HSSFCellStyle.ALIGN_CENTER); HSSFFont fontDescr = wb.createFont(); @@ -2692,7 +2692,7 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject { if(Globals.disclaimerPositionedTopInCSVExcel()) { rowNum += 1; row = sheet.createRow(rowNum); - sheet.addMergedRegion(new Region(rowNum, s1, rowNum, s2)); + sheet.addMergedRegion(new CellRangeAddress(rowNum, rowNum, s1, s2)); HSSFCellStyle styleDescription = wb.createCellStyle(); styleDescription.setAlignment(HSSFCellStyle.ALIGN_CENTER); HSSFFont fontDescr = wb.createFont(); @@ -2723,7 +2723,7 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject { /* footer.font("Tahoma"); short s1 = 0, s2 = (short) (col-1); rowNum += 1; - sheet.addMergedRegion(new Region(rowNum, s1, rowNum, s2)); + sheet.addMergedRegion(new CellRangeAddress(rowNum, rowNum, s1, s2)); HSSFRow row = null, row1 = null; row = sheet.createRow(rowNum); @@ -2743,7 +2743,7 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject { cell.setCellStyle(styleFooter); rowNum += 1; - sheet.addMergedRegion(new Region(rowNum, s1, rowNum, s2)); + sheet.addMergedRegion(new CellRangeAddress(rowNum, rowNum, s1, s2)); row = sheet.createRow(rowNum); cell = row.createCell((short) 0); debugLogger.debug(Globals.getFooterSecondLine()); @@ -4654,7 +4654,7 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject { title = Utils.replaceInString(title,"_nl_", " \n"); sw.createCell(cellNum,Utils.excelEncode(title), styles.get("header").getIndex()); - //sheet.addMergedRegion(new Region(rowNum, (short) cellNum, rowNum+columnRows, (short) (cellNum))); + //sheet.addMergedRegion(new CellRangeAddress(rowNum, rowNum+columnRows, (short) cellNum, (short) (cellNum))); //System.out.println(" **************** Row Header Title " + rhc.getColumnTitle() + " " + cellNum + " " ); //System.out.println(cellNum + " " + cellWidth.size()); } // for @@ -4674,7 +4674,7 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject { for ( int k = 1; k <= colSpan; k++ ) { sw.createCell(cellNum+k, "", styles.get("header").getIndex()); } - //sheet.addMergedRegion(new Region(rowNum, (short) cellNum, rowNum, (short) (cellNum+colSpan))); + //sheet.addMergedRegion(new CellRangeAddress(rowNum, rowNum, (short) cellNum, (short) (cellNum+colSpan))); } if(colSpan > 0) cellNum += colSpan; @@ -6312,7 +6312,7 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject { row = sheet.createRow((short) ++rowNum); cellNum = 0; cell = row.createCell((short) cellNum); - sheet.addMergedRegion(new Region(rowNum, s1, rowNum, s2)); + sheet.addMergedRegion(new CellRangeAddress(rowNum, rowNum, s1, s2)); cell.setCellValue(strip.stripHtml(customizedParamInfo)); } */ -- cgit 1.2.3-korg