-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #2427: Arxiv fetcher works with prefix #2428
Conversation
@@ -107,6 +107,10 @@ public ArXiv(ImportFormatPreferences importFormatPreferences) { | |||
} | |||
|
|||
private Optional<ArXivEntry> searchForEntryById(String identifier) throws FetcherException { | |||
identifier = identifier.replace("arxiv:", ""); | |||
identifier = identifier.replace("arXiv:", ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you just replace this via a regex? /arxiv:?/i
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would vote for an ArXivID class, similar to the DOI one which can handle such a case.
@@ -76,6 +76,14 @@ public void findByEprint() throws IOException { | |||
} | |||
|
|||
@Test | |||
// Test for https://github.com/JabRef/jabref/issues/2427 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would omit the comment here. It is a test for expected behavior. Doesnt matter which bug/problem it fixed.
@@ -139,6 +147,12 @@ public void searchEntryByIdWith4Digits() throws Exception { | |||
} | |||
|
|||
@Test | |||
// Test for https://github.com/JabRef/jabref/issues/2427 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
// Test for https://github.com/JabRef/jabref/issues/2427 | ||
public void findByEprintWithPrefix() throws IOException { | ||
entry.setField("eprint", "arXiv:1603.06570"); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove empty line
@@ -139,6 +147,12 @@ public void searchEntryByIdWith4Digits() throws Exception { | |||
} | |||
|
|||
@Test | |||
// Test for https://github.com/JabRef/jabref/issues/2427 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove url
I merged it and will do the requested changes now to get this into 3.8.2. |
* upstream/master: Save deletion of current searchquery (#2469) Update dev dependencies (mockito, wiremock, assertj) Update BouncyCastle (1.55->1.56), ANTRL4 (4.5.3->4.6), jsoup (1.10.1->1.10.2) Group all checker which only check the value of one field (#2437) Follow up #2428 (#2438) Fix conversion of "'n" and "\'{n}" from LaTeX to Unicode (#2464) Fix failing tests
gradle localizationUpdate
?