File tree 2 files changed +11
-4
lines changed
main/java/org/jabref/logic/importer/fetcher
test/java/org/jabref/logic/importer/fetcher
2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -74,10 +74,8 @@ public Optional<URL> findFullText(BibEntry entry) throws IOException {
74
74
.filter (Optional ::isPresent )
75
75
.map (Optional ::get )
76
76
.findFirst ();
77
+ pdfUrl .ifPresent (url -> LOGGER .info ("Fulltext PDF found @ arXiv." ));
77
78
78
- if (pdfUrl .isPresent ()) {
79
- LOGGER .info ("Fulltext PDF found @ arXiv." );
80
- }
81
79
return pdfUrl ;
82
80
} catch (FetcherException e ) {
83
81
LOGGER .warn ("arXiv API request failed" , e );
Original file line number Diff line number Diff line change 23
23
24
24
@ FetcherTest
25
25
class ArXivTest {
26
-
27
26
private ArXiv finder ;
28
27
private BibEntry entry ;
29
28
private BibEntry sliceTheoremPaper ;
@@ -121,6 +120,16 @@ void findFullTextByDOINotAvailableInCatalog() throws IOException {
121
120
assertEquals (Optional .empty (), finder .findFullText (entry ));
122
121
}
123
122
123
+ @ Test
124
+ void findFullTextEntityWithoutDoi () throws IOException {
125
+ assertEquals (Optional .empty (), finder .findFullText (entry ));
126
+ }
127
+
128
+ @ Test
129
+ void findFullTextTrustLevel () {
130
+ assertEquals (TrustLevel .PREPRINT , finder .getTrustLevel ());
131
+ }
132
+
124
133
@ Test
125
134
void searchEntryByPartOfTitle () throws Exception {
126
135
assertEquals (Collections .singletonList (sliceTheoremPaper ),
You can’t perform that action at this time.
0 commit comments