Skip to content
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

Merged
merged 3 commits into from
May 17, 2017

Conversation

landreev
Copy link
Contributor

@landreev landreev commented May 1, 2017

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

…ds headers, for records that occur in multiple sets.
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.004%) to 10.098% when pulling a908321 on 3687-oai-multiple-sets-in-list-verbs into 9fc60ad on develop.

…, as requested in #3687,

with multiple sets showing in the record headers.
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.006%) to 10.096% when pulling 1e32ab0 on 3687-oai-multiple-sets-in-list-verbs into 9fc60ad on develop.

Copy link
Contributor

@raprasad raprasad left a 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()) {
Copy link
Contributor

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";
Copy link
Contributor

@raprasad raprasad May 11, 2017

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

Copy link
Contributor Author

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.

Copy link
Contributor Author

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")

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.05%) to 10.055% when pulling 8800ad7 on 3687-oai-multiple-sets-in-list-verbs into 9fc60ad on develop.

@raprasad
Copy link
Contributor

  • moving this to QA

@kcondon kcondon merged commit a8f0e0c into develop May 17, 2017
@kcondon kcondon deleted the 3687-oai-multiple-sets-in-list-verbs branch May 17, 2017 17:47
@pdurbin pdurbin added this to the 4.6.2 - Tabular Mapping milestone Apr 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants