You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "matthiasblaesing (via GitHub)" <gi...@apache.org> on 2023/03/14 19:42:59 UTC

[GitHub] [netbeans] matthiasblaesing commented on a diff in pull request #5661: Improve image display tool (antialias, improved dragging, optimize menu and fix warnings)

matthiasblaesing commented on code in PR #5661:
URL: https://github.com/apache/netbeans/pull/5661#discussion_r1136101276


##########
ide/image/src/org/netbeans/modules/image/ImageOpenSupport.java:
##########
@@ -89,20 +91,16 @@ public void fileChanged(final FileEvent evt) {
                         entry.getFile().addFileChangeListener(this);
                         return;
                     }
-                    
+
                     if (evt.getTime() > lastSaveTime) {
                         lastSaveTime = System.currentTimeMillis();
-                        
+
                         // Post in new task.
                         if(reloadTask == null || reloadTask.isFinished()) {
-                        
-                            reloadTask = RequestProcessor.getDefault().post(
-                                new Runnable() {
-                                    public void run() {
-                                        reload(evt);
-                                    }
-                                }
-                            );
+
+                            reloadTask = RequestProcessor.getDefault().post(() -> {

Review Comment:
   Thank you, valid idea. In the end the two should be more or less equivalent and runtime is dominated by the actual work, so I'll not respin this patch.



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