matthiasblaesing commented on a change in pull request #3230:
URL: https://github.com/apache/netbeans/pull/3230#discussion_r725694080
##########
File path:
enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/FileSearchUtility.java
##########
@@ -205,7 +205,12 @@ private static String guessPackageName(final FileObject f)
{
} catch (java.io.IOException ioe) {
Logger.getLogger("global").log(Level.INFO, null, ioe);
} finally {
- try { if (r != null) { r.close(); }} catch (java.io.IOException
ioe) { ; // ignore this
+ try {
+ if (r != null) {
+ r.close();
+ }
+ } catch (java.io.IOException ioe) {
+ // ignore this
Review comment:
Please make this a try-with-resource, that makes it more readable and
even shorter than the original.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists