-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 PDF relativization test #12621
base: main
Are you sure you want to change the base?
Fix PDF relativization test #12621
Changes from all commits
d5d1e6e
56a0c5f
21cf853
a8a3817
46bc11f
9e68955
d8d1654
3c5bd14
0fdb00c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,8 +25,8 @@ public PdfGrobidImporter(ImportFormatPreferences importFormatPreferences) { | |
this.importFormatPreferences = importFormatPreferences; | ||
} | ||
|
||
public List<BibEntry> importDatabase(Path filePath, PDDocument document) throws IOException, ParseException { | ||
return grobidService.processPDF(filePath, importFormatPreferences); | ||
public List<BibEntry> importDatabase(Path fullPath, PDDocument document) throws IOException, ParseException { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The method accepts PDDocument parameter but doesn't use it in the implementation, violating the Single Responsibility Principle by having unused parameters. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it just uses grobid. Is there any way to mark this argument as explicitly unused? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why can't it be removed - I don't see any There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh! It should be overriden There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Then you can add JavaDoc and use |
||
return grobidService.processPDF(fullPath, importFormatPreferences); | ||
} | ||
|
||
@Override | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,8 +22,8 @@ public PdfXmpImporter(XmpPreferences xmpPreferences) { | |
this.xmpPreferences = xmpPreferences; | ||
} | ||
|
||
public List<BibEntry> importDatabase(Path filePath, PDDocument document) throws IOException { | ||
return new XmpUtilReader().readXmp(filePath, xmpPreferences); | ||
public List<BibEntry> importDatabase(Path fullPath, PDDocument document) throws IOException { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Method accepts PDDocument parameter but doesn't use it in the implementation, violating Single Responsibility Principle by having unused parameters. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, this is expected. Is there any way to mark this argument as explicitly unused? |
||
return new XmpUtilReader().readXmp(fullPath, xmpPreferences); | ||
InAnYan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
@Override | ||
|
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.
The try-catch block removal shifts exception handling responsibility to the caller without documenting this change in method signature. Method should declare 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.
IntelliJ said that it is not thrown at all