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

Fixed ServletException #4548 #4691

Merged
merged 2 commits into from
May 18, 2018

Conversation

juancorr
Copy link

@juancorr juancorr commented May 18, 2018

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

  • connects to #ISSUE_NUMBER: ISSUE_TITLE

Pull Request Checklist


Update by @pdurbin 2018-05-18

connects to #4548

I'm adding the "connects to" line above to associate the pull request with the issue. For more on this, please see http://guides.dataverse.org/en/4.8.6/developers/version-control.html#make-a-pull-request

@coveralls
Copy link

coveralls commented May 18, 2018

Coverage Status

Coverage decreased (-0.0002%) to 13.171% when pulling 36837f6 on Consorcio-Madrono:4548-harvesting-clients into 42014cb on IQSS:develop.

Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some comments but @landreev is in a much better position than I am to evaluate this pull request since he wrote all the code that's being modified. I'm also wondering if we should address #4683 as part of the same effort before this reaches QA.

}
outputStream.write(METADATA_END_ELEMENT.getBytes());
} else {
outputStream.write(customMetadataExtensionRef(this.dataset.getGlobalId()).getBytes());
}
outputStream.flush();

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@juancorr thanks again for the pull request.

At standup this morning I offered to take a look but I just requested a review from @landreev because this is all code he wrote. I loaded up the code in Netbeans and here's a screenshot with some arrows pointing to specific lines that I'm wondering about:

screen shot 2018-05-18 at 12 23 02 pm

At line 73 I'm wondering if we should put the newly added header.getStatus() check in this part of the code since it's where we're throwing an IOException already. Maybe all the error checking should go here, I mean.

At line 101 I'm wondering if we should add an else for the new header.getStatus() check. What do we want to happen? Throw an IOException?

At line 113 I noticed that we're already checking header.getStatus() (the itemHeaderToString method gets called at line 70). It seems like there's potential to only have one check.

Oh, I didn't add an arrow for this but in line 87 I noticed that we're using a deprecated getInstance method. I left a comment about this at #4683 (comment) because it feels a little more on topic there but while we're in this part of the code I'm wondering if we should fix #4683. Here's the screenshot I added there:

screen shot 2018-05-18 at 12 15 46 pm

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @pdurbin and @landreev, I think that I can response to your three arrows:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@juancorr thanks! @landreev explained some of this to me on Friday and the pull request was already merged then but it's always good to share knowledge about how all this works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants