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 Quota Request Bug (NullPointerException) when the resource is N… #229

Merged
merged 2 commits into from
Nov 22, 2021

Conversation

rafox2005
Copy link
Contributor

Fixed Quota Request Bug (NullPointerException) when the resource is Not Found. Now, it checks if the resource is OK (200) before creating the DavQuota object

Because the Webdav Quota property is optional. I was having a problem (NullPointerException) with a 404 response from a server when I required the properties. Now I changed the code to check if the response if 200 (OK) before creating the DavQuota object.

Maybe the way I fixed this issue is not the best, but it works ;)

…ot Found. Now, it checks if the resource is OK (200) before creating the DavQuota object.
@dankarp
Copy link
Collaborator

dankarp commented Oct 19, 2015

.contains("200") is probably not the right way to do this.

If we take pull request #230, could we wrap the Response in a DavResource, check its getStatusCode() , and pass the DavResource to the DavQuota constructor?

@rafox2005
Copy link
Contributor Author

Great feedback @dankarp. Is it okay now?

Thanks!

@dkocher
Copy link
Collaborator

dkocher commented Feb 19, 2016

Can you please rebase with master to fix the tests.

@dkocher dkocher merged commit 3e0c98d into lookfirst:master Nov 22, 2021
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.

3 participants