svatoun commented on a change in pull request #361: my first refactoring session
URL: https://github.com/apache/incubator-netbeans/pull/361#discussion_r161167814
 
 

 ##########
 File path: 
refactoring.api/src/org/netbeans/modules/refactoring/api/RefactoringSession.java
 ##########
 @@ -82,29 +80,23 @@ public static RefactoringSession create(@NonNull String 
description) {
         return new RefactoringSession(description);
     }
 
-
     /**
-     * process all elements from elements bags,
-     * do all fileChanges
-     * and call all commits
+     * process all elements from elements bags, do all fileChanges and call all
+     * commits
+     *
      * @param saveAfterDone save all if true
      * @return instance of Problem or null, if everything is OK
      */
     @CheckForNull
     public Problem doRefactoring(final boolean saveAfterDone) {
-        return Utilities.runWithOnSaveTasksDisabled(new Action<Problem>() {
-            @Override public Problem run() {
-                return reallyDoRefactoring(saveAfterDone);
-            }
-        });
+        return Utilities.runWithOnSaveTasksDisabled(() -> 
reallyDoRefactoring(saveAfterDone));
     }
-    
+
     private Problem reallyDoRefactoring(boolean saveAfterDone) {
-        long time = System.currentTimeMillis();
-        
+        final long start = System.currentTimeMillis();
         Iterator it = internalList.iterator();
 
 Review comment:
   If this PR is to improve readability, it should use type params when 
possible to eliminate (unnecessary) typecasts. Please add it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to