Skip to content

Commit

Permalink
Even more debug
Browse files Browse the repository at this point in the history
  • Loading branch information
koppor committed Jun 3, 2024
1 parent 1c4d2a1 commit 9eee6e3
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,19 @@ private BibDatabaseDiff(BibDatabaseContext originalDatabase, BibDatabaseContext
preambleDiff = PreambleDiff.compare(originalDatabase, newDatabase);
bibStringDiffs = BibStringDiff.compare(originalDatabase.getDatabase(), newDatabase.getDatabase());
entryDiffs = getBibEntryDiffs(originalDatabase, newDatabase);
if (LOGGER.isDebugEnabled()) {
if (LOGGER.isDebugEnabled() && !isEmpty()) {
LOGGER.debug("Differences detected");
metaDataDiff.ifPresent(diff -> LOGGER.debug("Metadata differences: {}", diff));
preambleDiff.ifPresent(diff -> LOGGER.debug("Premble differences: {}", diff));
LOGGER.debug("BibString differences: {}", bibStringDiffs);
LOGGER.debug("Entry differences: {}", entryDiffs);
}
}

private boolean isEmpty() {
return !metaDataDiff.isPresent() && !preambleDiff.isPresent() && bibStringDiffs.isEmpty() && entryDiffs.isEmpty();
}

private List<BibEntryDiff> getBibEntryDiffs(BibDatabaseContext originalDatabase, BibDatabaseContext newDatabase) {
final List<BibEntryDiff> entryDiffs;
// Sort both databases according to a common sort key.
Expand Down

0 comments on commit 9eee6e3

Please sign in to comment.