sonar issues

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1897675 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2022-02-01 21:16:05 +00:00
parent 47236ba149
commit c86141c9fd
2 changed files with 3 additions and 3 deletions

View File

@ -114,8 +114,7 @@ public abstract class BaseXSSFFormulaEvaluator extends BaseFormulaEvaluator {
XSSFCell cell = row.getCell(cellIndex);
String cellValue = cell.getRawValue();
String cellR = new CellReference(cell).formatAsString(false);
externalLinksTable.cacheData(sheet.getSheetName(), rowIndex + 1, cellR, cellValue);
externalLinksTable.cacheData(sheet.getSheetName(), (long)rowIndex + 1, cellR, cellValue);
}
}

View File

@ -76,7 +76,8 @@ public final class NumberValueFunction implements FreeRefFunction {
return e.getErrorEval();
}
if("".equals(text)) text = "0"; //If an empty string ("") is specified as the Text argument, the result is 0.
if("".equals(text) || text == null) text = "0"; //If an empty string ("") is specified as the Text argument, the result is 0.
text = text.replace(" ", ""); //Empty spaces in the Text argument are ignored, even in the middle of the argument. For example, " 3 000 " is returned as 3000.
String[] parts = text.split("["+decSep+"]");
String sigPart = "";