Major bug: cell differences ignored fixed
This commit is contained in:
@@ -272,11 +272,15 @@ public class FileActions extends JFrame {
|
||||
|
||||
WorkbookComparisonResult compareResult = excel1.compareTo(excel2);
|
||||
|
||||
if (compareResult.tablesAreEquals()) {
|
||||
System.out.printf("RESULT: Tables %s and %s are equal.\n", resultFilePath, pClientFilePath);
|
||||
} else {
|
||||
ExcelWorkbook integratedTable = (ExcelWorkbook) compareResult.integrateDifferencesIntoMaster();
|
||||
|
||||
integratedTable.save();
|
||||
|
||||
Desktop.getDesktop().open(resultFilePath.toFile());
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
JOptionPane.showMessageDialog(this, "Cannot open comparison result file.", "Error",
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
|
||||
@@ -1180,10 +1180,6 @@ public abstract class AbstractTable implements Table {
|
||||
} else if (cmpValue instanceof String && !(thisValue instanceof String)) {
|
||||
thisValue = thisValue.toString();
|
||||
}
|
||||
} else {
|
||||
result.addCellDifference(thisKey, n, colName, cmpRowNo, colName);
|
||||
rowsAreEqual = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!Objects.deepEquals(thisValue, cmpValue)) {
|
||||
|
||||
@@ -85,7 +85,7 @@ public class WorkbookComparisonResult {
|
||||
return result;
|
||||
}
|
||||
|
||||
boolean tablesAreEquals() {
|
||||
public boolean tablesAreEquals() {
|
||||
boolean result = masterIncludesClientTables() && tablesToDeleteFromMaster.isEmpty();
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user