-
-
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
[WIP] Refactored around the FileAnnotationCache. #2557
[WIP] Refactored around the FileAnnotationCache. #2557
Conversation
…orks as intended, i.e., fully automatically instead of manual maintenance.
@@ -1102,7 +1107,7 @@ public void stateChanged(ChangeEvent event) { | |||
|
|||
|
|||
class DeleteAction extends AbstractAction { | |||
public DeleteAction() { | |||
DeleteAction() { |
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 think, checkstyle or codacy or some other toal moans because of package private. Nevertheless, I think, it is OK to reduce visibility.
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.
It seems like codacy does not like default visibility at all
|
||
if(!tab.isInitialized) { | ||
|
||
try { |
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.
indent? - Think, indent is wrong here.
* Adds pdf comments from all attached pdf files belonging to the entry selected in the main table and | ||
* shows those from the first file in the comments tab | ||
* Adds pdf annotations from all attached pdf files belonging to the entry selected in the main table and | ||
* shows those from the first file in the file annotations tab | ||
* @throws IOException |
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 remove that, @throws
javadoc, because it does not add any more information.
public List<ParsedFileField> getFilteredFileList() { | ||
return FileField.parse(this.entry.getField(FieldName.FILE).get()).stream() | ||
.filter(parsedFileField -> parsedFileField.getLink().toLowerCase().endsWith(".pdf")) | ||
.filter(parsedFileField -> !parsedFileField.getLink().contains("www.")).collect(Collectors.toList()); |
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'm not sure whether this line is really valid. Did you find a test case for that? I assume, a user put an URL in the file field. This should not be checked here, but at other places (integrity check, ...)
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.
actually this is a one-to-one copy of what has been there before. I don't have the domain-specific insight if it makes sense.
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.
Besides minor comments: looks good to me. Thank you for the effort!
Hey, I have tried to fix the issues from your review. Check my comments on the particular parts above. |
…or-fileAnnotations-caching
…or-fileAnnotations-caching
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. Thank you for your contribution!
* upstream/master: Revert "Update gradle from 3.3 to 3.4" Localization tests (#2582) Update IEEEJournalList (#2579) Keyword - Special field synchronization (#2583) Update gradle from 3.3 to 3.4 Check similarity of entry when using DOI retrieval with ArXiV (#2575) Add logic for new Sciencedirect pages (#2576) [WIP] Refactored around the FileAnnotationCache. (#2557)
The Cache now works as intended, i.e., fully automatically instead of manual maintenance.