You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2021/10/10 20:36:51 UTC
[GitHub] [netbeans] matthiasblaesing commented on a change in pull request #3230: [NETBEANS-6081] - Cleaning enterprise module part 3/8
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists