-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Use streaming when downloading from DOI #14384
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
base: main
Are you sure you want to change the base?
Conversation
|
Format fails because formatter does not work with Markdown properly (yet). EAP does. --- a/jablib/src/main/java/org/jabref/logic/net/URLDownload.java
+++ b/jablib/src/main/java/org/jabref/logic/net/URLDownload.java
@@ -61,7 +61,7 @@ import org.slf4j.LoggerFactory;
/// String content = dl.asString(ENCODING);
/// dl.toFile(Path); // available in FILE
/// String contentType = dl.getMimeType();
-/// ```
+///```
///
/// Almost every call to a public method creates a new HTTP connection
/// (except for {@link #asString(Charset, URLConnection) asString},I filed https://github.com/leventeBajczi/intellij-idea-format/pull/4/files to check whether the latest version works. |
| } | ||
|
|
||
| private void setPageCountToArticleId(BibEntry entry, String doiAsString) { | ||
| private void setPageNumbersBasedOnDoi(BibEntry entry, DOI doi) { |
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.
Count and page numbers are two different thing
E.g total pages
Siedlerchr
left a comment
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.
Add tests
|
|
||
| /// Trims whitespaces at the beginning of the BibEntry | ||
| public void trimLeft() { | ||
| this.parsedSerialization = parsedSerialization.trim(); // we should do "trimLeft", but currently, it is OK as is. |
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.
Add a test
Fixes #14089
Was a bit larger than I thought; the DoiFetcher code needed a cleanup. There was also a space inserted. I don't know why this disappeared when reading from the String; maybe there was some automatic trimming. I added
DoiFetcher.httpfor easy manual checking of the returned file.Steps to test
Just see the fetcher tests passing.
Mandatory checks
CHANGELOG.mdin a way that is understandable for the average user (if change is visible to the user)