-
-
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 for issue 7633: Unable to download arXiv pdfs if Title contains curly brackets #7652
Conversation
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.
LGTM, thanks!
Please fix the checkstyle issues as reported by our review dog.
There's also an architecture violation, as StringUtil is increased in size |
So is it not allowed to add anything in StringUtil? Shall I simply move the function from StringUtil to Arxiv? |
As for the checkstyle, I just fix a part of it. The only warning message remains is " '{' is not preceded with whitespace“, but it may cause some problems if I add a white space before '{', as my sentence is: replace("{", "") |
@Pikayue11 The checkstyle is referring to the method definition (look at the changes tab, reviewdog makrs the line) |
I'm sorry, now the checkstyle should be correct. |
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.
Thanks, lgtm
the unit tests failing are relevant to the help. something got wrong there |
…om.tngtech.archunit-archunit-junit5-api-0.18.0 * upstream/main: Fix exception when searching (#7659) Fixes Jabref#7660 (#7663) Fix for issue 5850: Journal abbreviations in UTF-8 not recognized (#7639) Fix SSLHandshake Exception by using bypass (#7657) Fix for issue 7633: Unable to download arXiv pdfs if Title contains curly brackets (#7652) Fix#7195 partly Opacity of disabled icon-buttons
Fix #7633
CHANGELOG.md
described in a way that is understandable for the average user (if applicable)Reproduce the issue:
1 Open library, select the .bib file as below
2 Double click the entry and then click the Get fulltext on the right of **general | file **, it will give a message of "No full text document found"
3 And if we erase the curly brackets in the title, with other keep the same, it will download the pdf file successfully , the new title is given below
After reading the source code, I thought that it is the case that doi is not present and we need to use the author and title to query the url of the pdf file. However, the title with curly brackets may fail to search a arXiv entry, or the search is success but the title fails to match the arXiv title.
Process to fix the issue:
1 The arXiv-related work is in the ArXiv.java
2 Then I found the url of pdf is defined in the function findFullText, and it further invoke function searchForEntries
3 I defined a method called ignoreCurlyBracket in StringUtil.java to erase the curly brackets in the title if the title is not blank.
4 In the function searchForEntries, I invoke ignoreCurlyBracket to fix the title before it serve as a parameter to search arXiv entry and before the comparison with arXiv title.
Screenshots of the result:
Before
After
Download successfully