From 1e1c30de4f6ca53dd58c498bfe1b4b74cc019dff Mon Sep 17 00:00:00 2001 From: Rishiraj Anand Date: Thu, 29 Aug 2024 18:08:33 +0530 Subject: [PATCH] Upgrade apache poi to 5.2.5 --- .../org/drools/decisiontable/parser/xls/ExcelParser.java | 8 ++++---- .../scorecards/parser/xls/XLSEventDataCollector.java | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drools-decisiontables/src/main/java/org/drools/decisiontable/parser/xls/ExcelParser.java b/drools-decisiontables/src/main/java/org/drools/decisiontable/parser/xls/ExcelParser.java index d0191af99e2..c306eeb8460 100644 --- a/drools-decisiontables/src/main/java/org/drools/decisiontable/parser/xls/ExcelParser.java +++ b/drools-decisiontables/src/main/java/org/drools/decisiontable/parser/xls/ExcelParser.java @@ -181,7 +181,7 @@ private void processSheet( Sheet sheet, mergedColStart = cell.getColumnIndex(); } - switch ( cell.getCellTypeEnum() ) { + switch ( cell.getCellType() ) { case BOOLEAN: newCell(listeners, i, @@ -257,7 +257,7 @@ private boolean isGeneralFormat(Cell cell) { } private String getFormulaValue( DataFormatter formatter, FormulaEvaluator formulaEvaluator, Cell cell ) { - if ( formulaEvaluator.evaluate( cell ).getCellTypeEnum() == CellType.BOOLEAN ) { + if ( formulaEvaluator.evaluate( cell ).getCellType() == CellType.BOOLEAN ) { return cell.getBooleanCellValue() ? "true" : "false"; } return formatter.formatCellValue(cell, formulaEvaluator); @@ -266,7 +266,7 @@ private String getFormulaValue( DataFormatter formatter, FormulaEvaluator formul private String tryToReadCachedValue( Cell cell ) { DataFormatter formatter = new DataFormatter( Locale.ENGLISH ); String cachedValue; - switch ( cell.getCachedFormulaResultTypeEnum() ) { + switch ( cell.getCachedFormulaResultType() ) { case NUMERIC: double num = cell.getNumericCellValue(); if ( num - Math.round( num ) != 0 ) { @@ -296,7 +296,7 @@ private String tryToReadCachedValue( Cell cell ) { } private String getCellValue( final CellValue cv ) { - switch ( cv.getCellTypeEnum() ) { + switch ( cv.getCellType() ) { case BOOLEAN: return Boolean.toString( cv.getBooleanValue() ); case NUMERIC: diff --git a/drools-scorecards/src/main/java/org/drools/scorecards/parser/xls/XLSEventDataCollector.java b/drools-scorecards/src/main/java/org/drools/scorecards/parser/xls/XLSEventDataCollector.java index 65dbac85ffe..bce758f7cf8 100644 --- a/drools-scorecards/src/main/java/org/drools/scorecards/parser/xls/XLSEventDataCollector.java +++ b/drools-scorecards/src/main/java/org/drools/scorecards/parser/xls/XLSEventDataCollector.java @@ -16,7 +16,7 @@ package org.drools.scorecards.parser.xls; -import org.apache.poi.hssf.util.CellReference; +import org.apache.poi.ss.util.CellReference; import org.dmg.pmml.pmml_4_2.descr.*; import org.drools.core.util.StringUtils; import org.kie.pmml.pmml_4_2.extensions.PMMLExtensionNames; @@ -52,7 +52,7 @@ public Scorecard getScorecard() { private void fulfillExpectation(int currentRowCtr, int currentColCtr, Object cellValue, Class expectedClass) throws ScorecardParseException { List dataExpectations = resolveExpectations(currentRowCtr, currentColCtr); - CellReference cellRef = new CellReference(currentRowCtr, currentColCtr); + CellReference cellRef = new CellReference(currentRowCtr, currentColCtr,true,true); Method method = null; for (DataExpectation dataExpectation : dataExpectations) { try {