-
Notifications
You must be signed in to change notification settings - Fork 487
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
Quick fix for adding extra set names to the ListIdentifiers/ListRecords #3806
Conversation
…ds headers, for records that occur in multiple sets.
…, as requested in #3687, with multiple sets showing in the record headers.
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.
Marked 2 items to check
|
||
List<OAIRecord> oaiRecords = recordService.findOaiRecordsNotInThisSet(setSpec, from, until); | ||
|
||
if (oaiRecords == null && oaiRecords.isEmpty()) { |
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.
Should the &&
operator be changed to ||
return findOaiRecordsBySetName(setName, from, until, true); | ||
} | ||
|
||
public List<OAIRecord> findOaiRecordsBySetName(String setName, Date from, Date until, boolean excludeSet) { | ||
|
||
String queryString ="SELECT object(h) from OAIRecord as h where h.id is not null"; |
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.
Line 307, using as h
is inconsistent with line 291 where the as
is removed
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 first change requested - yes, it needed to be an "OR" of course, great catch; in practical terms, the way that method was being called, the OAIrecords list was never passed to it when null. So there wouldn't be any nullpointer exceptions right away; but it could definitely bite us in the butt in the future.
The second one... that "as" was definitely meaningless there. It's an old line of code too, imported from pre-Dataverse 4 implementation. So yes, I noticed and removed that "as" in line 291, but not in the other one.
Checked in a change that makes it consistent.
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 meant to say, "when null or empty anyway")
|
New Contributors
Welcome! New contributors should at least glance at CONTRIBUTING.md, especially the section on pull requests where we encourage you to reach out to other developers before you start coding. Also, please note that we measure code coverage and prefer you write unit tests. Pull requests can still be reviewed without tests or completion of the checklist outlined below. Thanks!
Related Issues
Pull Request Checklist