diff options
author | Sunder Tattavarada <statta@research.att.com> | 2020-09-14 18:58:32 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-09-14 18:58:32 +0000 |
commit | 40101982758fd0ac3f4ad3916c8a2aed52af0653 (patch) | |
tree | b8a23273ea346b26d1556c9aa77a9dbaeb93e167 | |
parent | e04e0fde35f8d67982714be3a929e010fdb9d5e0 (diff) | |
parent | be6462c0f76b301b96cf67f9789f0fddef9d4983 (diff) |
Merge "Upgraded few artifacts as part of Security fixes"
4 files changed, 44 insertions, 41 deletions
diff --git a/ecomp-sdk/epsdk-analytics/pom.xml b/ecomp-sdk/epsdk-analytics/pom.xml index 768b7d8b..7789fbf0 100644 --- a/ecomp-sdk/epsdk-analytics/pom.xml +++ b/ecomp-sdk/epsdk-analytics/pom.xml @@ -142,7 +142,7 @@ <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId> - <version>3.17</version> + <version>4.1.2</version> <exclusions> <exclusion> <groupId>commons-logging</groupId> @@ -157,7 +157,7 @@ <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> - <version>3.17</version> + <version>4.1.2</version> <exclusions> <exclusion> <groupId>commons-logging</groupId> @@ -172,7 +172,7 @@ <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-scratchpad</artifactId> - <version>3.17</version> + <version>4.1.2</version> <exclusions> <exclusion> <groupId>commons-logging</groupId> 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 d8dd9304..b8f3284c 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 @@ -214,30 +214,30 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject { XSSFCellStyle styleRed = wb.createCellStyle(); styleRed.cloneStyleFrom(styleDefault); - styleRed.setFillForegroundColor((short) HSSFColor.RED.index); + styleRed.setFillForegroundColor((short) HSSFColor.HSSFColorPredefined.RED.getIndex()); styleRed.setFillPattern(fillPattern.SOLID_FOREGROUND); XSSFFont fontRed = wb.createFont(); - fontRed.setColor((short) HSSFColor.WHITE.index); + fontRed.setColor((short) HSSFColor.HSSFColorPredefined.WHITE.getIndex()); fontRed.setFontHeight((short) (FONT_SIZE / 0.05)); fontRed.setFontName(FONT_TAHOMA); styleRed.setFont(fontRed); XSSFCellStyle styleYellow = wb.createCellStyle(); styleYellow.cloneStyleFrom(styleDefault); - styleYellow.setFillForegroundColor((short) HSSFColor.YELLOW.index); + styleYellow.setFillForegroundColor((short) HSSFColor.HSSFColorPredefined.YELLOW.getIndex()); styleYellow.setFillPattern(fillPattern.SOLID_FOREGROUND); XSSFFont fontYellow = wb.createFont(); - fontYellow.setColor((short) HSSFColor.BLACK.index); + fontYellow.setColor((short) HSSFColor.HSSFColorPredefined.BLACK.getIndex()); fontYellow.setFontHeight((short) (FONT_SIZE / 0.05)); fontYellow.setFontName(FONT_TAHOMA); styleYellow.setFont(fontYellow); XSSFCellStyle styleGreen = wb.createCellStyle(); styleGreen.cloneStyleFrom(styleDefault); - styleGreen.setFillForegroundColor((short) HSSFColor.GREEN.index); + styleGreen.setFillForegroundColor((short) HSSFColor.HSSFColorPredefined.GREEN.getIndex()); styleGreen.setFillPattern(fillPattern.SOLID_FOREGROUND); XSSFFont fontGreen = wb.createFont(); - fontGreen.setColor((short) HSSFColor.WHITE.index); + fontGreen.setColor((short) HSSFColor.HSSFColorPredefined.WHITE.getIndex()); fontGreen.setFontHeight((short) (FONT_SIZE / 0.05)); fontGreen.setFontName(FONT_TAHOMA); styleGreen.setFont(fontGreen); @@ -332,7 +332,7 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject { short s1 = 0; short s2 = (short) 1; XSSFCellStyle styleName = wb.createCellStyle(); - styleName.setFillForegroundColor(HSSFColor.GREY_25_PERCENT.index); + styleName.setFillForegroundColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()); styleName.setAlignment(HorizontalAlignment.CENTER); styleName.setBorderBottom(BorderStyle.THIN); styleName.setBorderTop(BorderStyle.THIN); @@ -342,7 +342,7 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject { XSSFFont font = wb.createFont(); font.setFontHeight((short) (FONT_SIZE / 0.05)); font.setFontName(FONT_TAHOMA); - font.setColor(HSSFColor.BLACK.index); + font.setColor(HSSFColor.HSSFColorPredefined.BLACK.getIndex()); font.setBold(true); styleName.setFont(font); @@ -368,7 +368,7 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject { XSSFFont fontDescr = wb.createFont(); fontDescr.setFontHeight((short) (FONT_SIZE / 0.05)); // 14 fontDescr.setFontName(FONT_TAHOMA); - fontDescr.setColor(HSSFColor.BLACK.index); + fontDescr.setColor(HSSFColor.HSSFColorPredefined.BLACK.getIndex()); fontDescr.setBold(true); styleDescription.setFont(font); XSSFCell cellDescr = null; @@ -521,7 +521,7 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject { XSSFCellStyle styleDate = wb.createCellStyle(); HtmlStripper strip = new HtmlStripper(); XSSFCellStyle styleDataHeader = wb.createCellStyle(); - styleDataHeader.setFillForegroundColor(HSSFColor.GREY_25_PERCENT.index); + styleDataHeader.setFillForegroundColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()); styleDataHeader.setFillPattern(fillPattern.SOLID_FOREGROUND); styleDataHeader.setAlignment(HorizontalAlignment.CENTER); styleDataHeader.setBorderBottom(BorderStyle.THIN); @@ -532,7 +532,7 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject { font.setFontHeight((short) (FONT_SIZE / 0.05)); font.setFontName(FONT_TAHOMA); font.setBold(true); - font.setColor(HSSFColor.BLACK.index); + font.setColor(HSSFColor.HSSFColorPredefined.BLACK.getIndex()); styleDataHeader.setFont(font); boolean firstPass = true; ArrayList cellWidth = new ArrayList(); @@ -2100,7 +2100,7 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject { XSSFFont font = wb.createFont(); font.setFontHeight((short) (FONT_HEADER_TITLE_SIZE / 0.05)); // 14 font.setFontName(FONT_TAHOMA); - font.setColor(HSSFColor.BLACK.index); + font.setColor(HSSFColor.HSSFColorPredefined.BLACK.getIndex()); styleHeader.setFont(font); XSSFCell cell = row.createCell((short) 0); @@ -2118,7 +2118,7 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject { XSSFFont fontDescr = wb.createFont(); fontDescr.setFontHeight((short) FONT_HEADER_DESCR_SIZE); fontDescr.setFontName(FONT_TAHOMA); - fontDescr.setColor(HSSFColor.BLACK.index); + fontDescr.setColor(HSSFColor.HSSFColorPredefined.BLACK.getIndex()); styleDescription.setFont(fontDescr); XSSFCell cellDescr = row.createCell((short) 0); cellDescr.setCellValue(reportDescr); @@ -2135,7 +2135,7 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject { XSSFFont fontDescr = wb.createFont(); fontDescr.setFontHeight((short) (FONT_SIZE / 0.05)); // 14 fontDescr.setFontName(FONT_TAHOMA); - fontDescr.setColor(HSSFColor.BLACK.index); + fontDescr.setColor(HSSFColor.HSSFColorPredefined.BLACK.getIndex()); fontDescr.setBold(true); styleDescription.setFont(fontDescr); XSSFCell cellDescr = row.createCell((short) 0); @@ -2416,7 +2416,10 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject { paintExcelParams(wb, rowNum, col, paramsList, rr.getFormFieldComments(request), sheet, reportTitle, reportDescr); } // if + rowNum = sheet.getLastRowNum(); + if(rowNum<0) + rowNum = 0; final String formattedReportName = new HtmlStripper().stripSpecialCharacters(rr.getReportName()); final String formattedDate = new SimpleDateFormat("MMddyyyyHHmm").format(new Date()); @@ -5088,7 +5091,7 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject { HtmlStripper strip = new HtmlStripper(); // Name Style HSSFCellStyle styleName = wb.createCellStyle(); - styleName.setFillForegroundColor(HSSFColor.GREY_25_PERCENT.index); + styleName.setFillForegroundColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()); styleName.setAlignment(HorizontalAlignment.CENTER); styleName.setBorderBottom(BorderStyle.THIN); styleName.setBorderTop(BorderStyle.THIN); @@ -5098,7 +5101,7 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject { HSSFFont font = wb.createFont(); font.setFontHeight((short) (FONT_SIZE / 0.05)); font.setFontName(FONT_TAHOMA); - font.setColor(HSSFColor.BLACK.index); + font.setColor(HSSFColor.HSSFColorPredefined.BLACK.getIndex()); font.setBold(font.getBold()); styleName.setFont(font); // Data Style @@ -5131,7 +5134,7 @@ public class ReportHandler extends org.onap.portalsdk.analytics.RaptorObject { HSSFFont fontDescr = wb.createFont(); fontDescr.setFontHeight((short) (FONT_HEADER_DESCR_SIZE / 0.05)); fontDescr.setFontName(FONT_TAHOMA); - fontDescr.setColor(HSSFColor.BLACK.index); + fontDescr.setColor(HSSFColor.HSSFColorPredefined.BLACK.getIndex()); fontDescr.setBold(true); styleDescription.setFont(font); XSSFCell cellDescr = null; diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/ExcelColorDef.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/ExcelColorDef.java index af979490..8d07333e 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/ExcelColorDef.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/ExcelColorDef.java @@ -47,23 +47,23 @@ public class ExcelColorDef { public static HashMap colors = new HashMap(); public static void initializeExcelColorDef() { - colors.put("#00FFFF",new Short(HSSFColor.AQUA.index)); - colors.put("#000000",new Short(HSSFColor.BLACK.index)); - colors.put("#0000FF",new Short(HSSFColor.BLUE.index)); - colors.put("#FF00FF",new Short(HSSFColor.PINK.index)); - colors.put("#808080",new Short(HSSFColor.GREY_40_PERCENT.index)); - colors.put("#008000",new Short(HSSFColor.BRIGHT_GREEN.index)); - colors.put("#00FF00",new Short(HSSFColor.LIME.index)); - colors.put("#800000",new Short(HSSFColor.MAROON.index)); - colors.put("#000080",new Short(HSSFColor.ROYAL_BLUE.index)); - colors.put("#808000",new Short(HSSFColor.OLIVE_GREEN.index)); - colors.put("#FF9900",new Short(HSSFColor.ORANGE.index)); - colors.put("#800080",new Short(HSSFColor.VIOLET.index)); - colors.put("#FF0000",new Short(HSSFColor.RED.index)); - colors.put("#C0C0C0",new Short(HSSFColor.CORAL.index)); - colors.put("#008080",new Short(HSSFColor.TEAL.index)); - colors.put("#FFFFFF",new Short(HSSFColor.WHITE.index)); - colors.put("#FFFF00",new Short(HSSFColor.YELLOW.index)); + colors.put("#00FFFF",new Short(HSSFColor.HSSFColorPredefined.AQUA.getIndex())); + colors.put("#000000",new Short(HSSFColor.HSSFColorPredefined.BLACK.getIndex())); + colors.put("#0000FF",new Short(HSSFColor.HSSFColorPredefined.BLUE.getIndex())); + colors.put("#FF00FF",new Short(HSSFColor.HSSFColorPredefined.PINK.getIndex())); + colors.put("#808080",new Short(HSSFColor.HSSFColorPredefined.GREY_40_PERCENT.getIndex())); + colors.put("#008000",new Short(HSSFColor.HSSFColorPredefined.BRIGHT_GREEN.getIndex())); + colors.put("#00FF00",new Short(HSSFColor.HSSFColorPredefined.LIME.getIndex())); + colors.put("#800000",new Short(HSSFColor.HSSFColorPredefined.MAROON.getIndex())); + colors.put("#000080",new Short(HSSFColor.HSSFColorPredefined.ROYAL_BLUE.getIndex())); + colors.put("#808000",new Short(HSSFColor.HSSFColorPredefined.OLIVE_GREEN.getIndex())); + colors.put("#FF9900",new Short(HSSFColor.HSSFColorPredefined.ORANGE.getIndex())); + colors.put("#800080",new Short(HSSFColor.HSSFColorPredefined.VIOLET.getIndex())); + colors.put("#FF0000",new Short(HSSFColor.HSSFColorPredefined.RED.getIndex())); + colors.put("#C0C0C0",new Short(HSSFColor.HSSFColorPredefined.CORAL.getIndex())); + colors.put("#008080",new Short(HSSFColor.HSSFColorPredefined.TEAL.getIndex())); + colors.put("#FFFFFF",new Short(HSSFColor.HSSFColorPredefined.WHITE.getIndex())); + colors.put("#FFFF00",new Short(HSSFColor.HSSFColorPredefined.YELLOW.getIndex())); } @@ -72,7 +72,7 @@ public class ExcelColorDef { return ((Short) colors.get(color)).shortValue(); } - return new Short(HSSFColor.WHITE.index).shortValue(); + return new Short(HSSFColor.HSSFColorPredefined.WHITE.getIndex()).shortValue(); } public static void main(String[] args) { diff --git a/ecomp-sdk/epsdk-core/pom.xml b/ecomp-sdk/epsdk-core/pom.xml index 753f0d8e..b65801c1 100644 --- a/ecomp-sdk/epsdk-core/pom.xml +++ b/ecomp-sdk/epsdk-core/pom.xml @@ -523,7 +523,7 @@ <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId> - <version>3.17</version> + <version>4.1.2</version> <exclusions> <exclusion> <groupId>commons-logging</groupId> @@ -538,7 +538,7 @@ <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> - <version>3.17</version> + <version>4.1.2</version> <exclusions> <exclusion> <groupId>commons-logging</groupId> @@ -553,7 +553,7 @@ <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-scratchpad</artifactId> - <version>3.17</version> + <version>4.1.2</version> <exclusions> <exclusion> <groupId>commons-logging</groupId> |