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 2022/05/09 19:36:11 UTC

[GitHub] [netbeans] lbownik commented on a diff in pull request #4080: code and test cleaning

lbownik commented on code in PR #4080:
URL: https://github.com/apache/netbeans/pull/4080#discussion_r868370322


##########
platform/openide.util/src/org/openide/util/ChangeSupport.java:
##########
@@ -21,7 +21,7 @@
 
 import java.util.List;
 import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.logging.Level;
+import static java.util.logging.Level.*;

Review Comment:
   My reasoning is:
   logger.log(FINE,..... is more compact than
   logger.log(Level.FILE, .......
   so it reads better (phrase "Level." is a noise here).
   Since log method ony accepts Level objects as first parameter there is no doubt what "FINE" is and where it comes from (well .. absolute Java beginners might have doubts the first time ... but I don't think they contribute to NetBeans).
   
   A counter example would be turning "Paths.get("C:\.....")" into "get(C:\...")". In this case uning static import would decrease readability.



-- 
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