SonarCube fixes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1769366 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fc86b15f13
commit
a6f005de81
@ -318,9 +318,7 @@ public class ExcelComparator {
|
||||
|
||||
if (!name1.equals(name2)) {
|
||||
String str = String.format(Locale.ROOT, "%s\nworkbook1 -> %s [%d] != workbook2 -> %s [%d]",
|
||||
"Name of the sheets do not match ::",
|
||||
loc1.sheet.getSheetName(), name1, i+1,
|
||||
loc2.sheet.getSheetName(), name2, i+1
|
||||
"Name of the sheets do not match ::", name1, i+1, name2, i+1
|
||||
);
|
||||
listOfDifferences.add(str);
|
||||
}
|
||||
|
@ -344,6 +344,7 @@ public class ToCSV {
|
||||
// (.xls) and the other a SpreadsheetML file (.xlsx), then the names
|
||||
// for both CSV files will be identical and one CSV file will,
|
||||
// therefore, over-write the other.
|
||||
if (filesList != null) {
|
||||
for(File excelFile : filesList) {
|
||||
// Open the workbook
|
||||
this.openWorkbook(excelFile);
|
||||
@ -363,6 +364,7 @@ public class ToCSV {
|
||||
this.saveCSVFile(new File(destination, destinationFilename));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Open an Excel workbook ready for conversion.
|
||||
|
@ -58,7 +58,7 @@ final class NetworkdaysFunction implements FreeRefFunction {
|
||||
*
|
||||
* @return {@link ValueEval} for the number of days between two dates.
|
||||
*/
|
||||
public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) {
|
||||
public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) { // NOSONAR
|
||||
if (args.length < 2 || args.length > 3) {
|
||||
return ErrorEval.VALUE_INVALID;
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ public final class FunctionMetadata {
|
||||
_minParams = minParams;
|
||||
_maxParams = maxParams;
|
||||
_returnClassCode = returnClassCode;
|
||||
_parameterClassCodes = parameterClassCodes;
|
||||
_parameterClassCodes = (parameterClassCodes == null) ? null : parameterClassCodes.clone();
|
||||
}
|
||||
public int getIndex() {
|
||||
return _index;
|
||||
|
@ -49,7 +49,7 @@ public final class FunctionMetadataRegistry {
|
||||
}
|
||||
|
||||
/* package */ FunctionMetadataRegistry(FunctionMetadata[] functionDataByIndex, Map<String, FunctionMetadata> functionDataByName) {
|
||||
_functionDataByIndex = functionDataByIndex;
|
||||
_functionDataByIndex = (functionDataByIndex == null) ? null : functionDataByIndex.clone();
|
||||
_functionDataByName = functionDataByName;
|
||||
}
|
||||
|
||||
|
@ -207,9 +207,12 @@ public final class OOXMLLite {
|
||||
private static void collectTests(File root, File arg, List<Class<?>> out, String ptrn, String exclude)
|
||||
throws ClassNotFoundException {
|
||||
if (arg.isDirectory()) {
|
||||
for (File f : arg.listFiles()) {
|
||||
File files[] = arg.listFiles();
|
||||
if (files != null) {
|
||||
for (File f : files) {
|
||||
collectTests(root, f, out, ptrn, exclude);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
String path = arg.getAbsolutePath();
|
||||
String prefix = root.getAbsolutePath();
|
||||
|
Loading…
Reference in New Issue
Block a user