mbien commented on code in PR #7053:
URL: https://github.com/apache/netbeans/pull/7053#discussion_r1491901823


##########
profiler/profiler.api/src/org/netbeans/modules/profiler/api/ProjectUtilities.java:
##########
@@ -137,17 +135,9 @@ public static void 
removeOpenProjectsListener(ChangeListener listener) {
     public static Provider[] getSortedProjects(Provider[] projects) {
         List<Provider> projectsArray = Arrays.asList(projects);
 
-        Collections.sort(projectsArray,
-                new Comparator() {
-
-                    @Override
-                    public int compare(Object o1, Object o2) {
-                        Provider p1 = (Provider) o1;
-                        Provider p2 = (Provider) o2;
-
-                        return 
getDisplayName(p1).toLowerCase().compareTo(getDisplayName(p2).toLowerCase());
-                    }
-                });
+        projectsArray.sort((Object o1, Object o2) -> 
+            getDisplayName((Provider) 
o1).toLowerCase().compareTo(getDisplayName((Provider) o2).toLowerCase())

Review Comment:
   oh interesting, I didn't know that this method existed. I did only transform 
to `equalsIgnoreCase()`
   
   I might do this at a later point since this PR is already large enough.
   But i am going to add this to my hints collection for sure 
https://github.com/mbien/jackpot-inspections
   thanks!



-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to