-
Notifications
You must be signed in to change notification settings - Fork 27
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
remove usage of IOUtil.close #149
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.
looks good.
I think it would be ok to use regular formatting for updated code sections if you want. This would make the formatting patch in future smaller.
InputStream instream = null; | ||
OutputStream output = null; | ||
try | ||
try (InputStream instream = getClass().getClassLoader().getResourceAsStream( path ); OutputStream output = new BufferedOutputStream( new FileOutputStream( destSh ) )) |
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.
split in two lines maybe?
try (InputStream instream = getClass().getClassLoader().getResourceAsStream(path);
OutputStream output = new BufferedOutputStream(new FileOutputStream(destSh))) {
try ( Reader source = new BufferedReader( new InputStreamReader( instream, "UTF-8" ) ); Writer destination = new OutputStreamWriter( outstream, "UTF-8" ); ) | ||
{ |
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.
try (Reader source = new BufferedReader(new InputStreamReader(instream, "UTF-8"));
Writer destination = new OutputStreamWriter(outstream, "UTF-8")) {
I will do on two line. I think I will have nervous breakdown and autoformat all and do a no op push to have in native NetBeans format like nb-pakage. |
NB can format code sections. You select something and format. |
a1da38c
to
54859d9
Compare
Yep but changing for new code will make the source a patchwork |
remove deprecation and use try with resources to get rid of this old code