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

It is important to check returnvalue of file.mkdirs() since it will #145

Merged
merged 1 commit into from Nov 30, 2015

Conversation

stoyle
Copy link
Contributor

@stoyle stoyle commented Jan 29, 2014

return false when it fails.

If it fails, a NullPointerException will occur on the line with
'for (final File f : parentDir.listFiles()) {'. Kind of difficult to
understand why. This exception should be pretty clear.

We've experienced this using cloudname in our application, because
the user did not have permission to create folders.

return false when it fails.

If it fails, a NullPointerException will occur on the line with
'for (final File f : parentDir.listFiles()) {'. Kind of difficult to
understand why. This exception should be pretty clear.

We've experienced this using cloudname in our application, because
the user did not have permission to create folders.
stalehd added a commit that referenced this pull request Nov 30, 2015
Check return value from File.mkdirs()

Throws NPE if the directory can't be created.
@stalehd stalehd merged commit b5e8203 into Cloudname:master Nov 30, 2015
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.

None yet

2 participants