-
Notifications
You must be signed in to change notification settings - Fork 169
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
Use try-with-resources #432
Conversation
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.
Why did the wrapper jar change?
8f04b59
to
7f43b0a
Compare
Not sure why the wrapper changed, thanks for catching that. |
Seems like travis ci is broken. Can you check the failures? |
2ea6cdc
to
43b46b2
Compare
43b46b2
to
becff1c
Compare
Ok! CI passes! :) |
TemplateReader replacingReader = new TemplateReader(reader, new TemplateMapResolver(templates)); | ||
|
||
OutputStream outputStream = new FileOutputStream(destination); | ||
destination.getParentFile().mkdirs(); |
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.
Can we move the directory creation inside the try?
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.
Same thing here new FileOutputStream(destination)
depends on this file having been created.
InputStream inputStream = FileUtil.class.getResourceAsStream(resource); | ||
destination.getParentFile().mkdirs(); | ||
OutputStream outputStream = new FileOutputStream(destination); | ||
destination.getParentFile().mkdirs(); |
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.
Can we move the directory creation inside the try?
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.
Actually, it can't. This was why this PR was originally failing on ci. The next line, new FileOutputStream(destination)
depends on this file having been created.
Luckily, this method doesn't throw an IOException.
* uber/master: Use stream instead of parallelStream (uber#437) Add empty resource rule if using resource union. (uber#438) Publich v0.20.7 Move okbuck task to its own gradle task class. (uber#436) Use try-with-resources (uber#432) Update README.md Do not allow okbuck to be run without okbuck.wrapper set to true. (uber#433) Set descriptions in tasks class instead of when creating them. (uber#431) Move cleaning the .okbuck/gen folder to the first step of setupOkbuck. (uber#430) Publish v0.20.6 Add support for downloading 22-25 API robolectric runtime dependencies. (uber#427) Skip okbuck if we just want to kill the buck daemon. (uber#425)
No description provided.