-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve code of BibDataBaseDiff (#11355)
* Streamline code Co-authored-by: Carl Christian Snethlage <[email protected]> * Enable debug output * Even more debug * convert to rrecord, adjust hashcode with equals * fix record conversion * Discard changes to src/main/resources/tinylog.properties --------- Co-authored-by: Carl Christian Snethlage <[email protected]> Co-authored-by: Siedlerchr <[email protected]>
- Loading branch information
1 parent
77c5188
commit 5c8eb42
Showing
9 changed files
with
83 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 11 additions & 14 deletions
25
src/main/java/org/jabref/logic/bibtex/comparator/BibEntryDiff.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,18 @@ | ||
package org.jabref.logic.bibtex.comparator; | ||
|
||
import org.jabref.model.entry.BibEntry; | ||
|
||
public class BibEntryDiff { | ||
private final BibEntry originalEntry; | ||
private final BibEntry newEntry; | ||
import java.util.StringJoiner; | ||
|
||
public BibEntryDiff(BibEntry originalEntry, BibEntry newEntry) { | ||
this.originalEntry = originalEntry; | ||
this.newEntry = newEntry; | ||
} | ||
import org.jabref.model.entry.BibEntry; | ||
|
||
public BibEntry getOriginalEntry() { | ||
return originalEntry; | ||
} | ||
public record BibEntryDiff( | ||
BibEntry originalEntry, | ||
BibEntry newEntry) { | ||
|
||
public BibEntry getNewEntry() { | ||
return newEntry; | ||
@Override | ||
public String toString() { | ||
return new StringJoiner(",\n", BibEntryDiff.class.getSimpleName() + "[", "]") | ||
.add("originalEntry=" + originalEntry) | ||
.add("newEntry=" + newEntry) | ||
.toString(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters