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

[CID-48110] - Resource leak on exceptional path in Util#makeResource() #105

Conversation

oleg-nenashev
Copy link
Member

fos.close();
try {
fos.write(image);
} finally {
Copy link
Member

Choose a reason for hiding this comment

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

🐜 simpler to use try-with-resources in -target 7

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure. But the PR is about Java 6. Upgrade to Java 7 is planned to remoting 3. See #103

@jglick
Copy link
Member

jglick commented Aug 23, 2016

🐝

@jglick
Copy link
Member

jglick commented Aug 23, 2016

BTW is FindBugs not getting these? Seems like standard FB fare.

@oleg-nenashev
Copy link
Member Author

@jglick It does

@oleg-nenashev
Copy link
Member Author

I just used CID since it allows referencing something for tracking

@daniel-beck
Copy link
Member

🐝

@oleg-nenashev
Copy link
Member Author

@reviewbybees done

@oleg-nenashev oleg-nenashev merged commit 8c2ba7f into jenkinsci:master Aug 23, 2016
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