Skip to content

Commit 5f3abb5

Browse files
authored
Reordered Pdf-Importer priorities (#8001)
* Reordered Pdf-Importer priorities * Adapted tests
1 parent 0b02dd4 commit 5f3abb5

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

src/main/java/org/jabref/logic/importer/fileformat/PdfMergeMetadataImporter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ public class PdfMergeMetadataImporter extends Importer {
4545
public PdfMergeMetadataImporter(ImportFormatPreferences importFormatPreferences) {
4646
this.importFormatPreferences = importFormatPreferences;
4747
this.metadataImporters = List.of(
48-
new PdfGrobidImporter(GrobidCitationFetcher.GROBID_URL, importFormatPreferences),
48+
new PdfVerbatimBibTextImporter(importFormatPreferences),
4949
new PdfEmbeddedBibFileImporter(importFormatPreferences),
50+
new PdfGrobidImporter(GrobidCitationFetcher.GROBID_URL, importFormatPreferences),
5051
new PdfXmpImporter(importFormatPreferences.getXmpPreferences()),
51-
new PdfVerbatimBibTextImporter(importFormatPreferences),
5252
new PdfContentImporter(importFormatPreferences)
5353
);
5454
}

src/test/java/org/jabref/logic/importer/fileformat/PdfMergeMetadataImporterTest.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,11 @@ void importWorksAsExpected() throws Exception {
5959

6060
// From DOI (contained in embedded bib file)
6161
BibEntry expected = new BibEntry(StandardEntryType.Book);
62-
expected.setCitationKey("Burd_2011");
63-
expected.setField(StandardField.AUTHOR, "Barry Burd");
64-
expected.setField(StandardField.TITLE, "Java{\\textregistered} For Dummies{\\textregistered}");
65-
expected.setField(StandardField.PUBLISHER, "Wiley Publishing, Inc.");
66-
expected.setField(StandardField.YEAR, "2011");
67-
expected.setField(StandardField.AUTHOR, "Barry Burd");
62+
expected.setCitationKey("9780134685991");
63+
expected.setField(StandardField.AUTHOR, "Bloch, Joshua");
64+
expected.setField(StandardField.TITLE, "Effective Java");
65+
expected.setField(StandardField.PUBLISHER, "Addison Wesley");
66+
expected.setField(StandardField.YEAR, "2018");
6867
expected.setField(StandardField.MONTH, "jul");
6968
expected.setField(StandardField.DOI, "10.1002/9781118257517");
7069

0 commit comments

Comments
 (0)