cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject [cayenne] branch master updated: Runnable -> lambda
Date Mon, 08 Jul 2019 10:40:46 GMT
This is an automated email from the ASF dual-hosted git repository.

aadamchik pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cayenne.git


The following commit(s) were added to refs/heads/master by this push:
     new b2f8daf  Runnable -> lambda
b2f8daf is described below

commit b2f8dafef10dbedddea1ed40e0452b553191a9c7
Author: Andrus Adamchik <andrus@objectstyle.com>
AuthorDate: Mon Jul 8 13:40:39 2019 +0300

    Runnable -> lambda
---
 .../main/java/org/apache/cayenne/modeler/Main.java | 27 ++++++++++------------
 1 file changed, 12 insertions(+), 15 deletions(-)

diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/Main.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/Main.java
index c0f5cce..5ccdb35 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/Main.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/Main.java
@@ -80,25 +80,22 @@ public class Main {
                 + " at "
                 + System.getProperty("java.home"));
 
-        SwingUtilities.invokeLater(new Runnable() {
+        SwingUtilities.invokeLater(() -> {
 
-            public void run() {
+            Application application = injector.getInstance(Application.class);
+            Application.setInstance(application);
+            application.startup();
 
-                Application application = injector.getInstance(Application.class);
-                Application.setInstance(application);
-                application.startup();
+            // start initial project AFTER the app startup, as we need Application
+            // preferences to be bootstrapped.
 
-                // start initial project AFTER the app startup, as we need Application
-                // preferences to be bootstrapped.
-
-                File project = initialProjectFromArgs();
-                if (project == null) {
-                    project = initialProjectFromPreferences();
-                }
+            File project = initialProjectFromArgs();
+            if (project == null) {
+                project = initialProjectFromPreferences();
+            }
 
-                if (project != null) {
-                    new OpenProjectAction(application).openProject(project);
-                }
+            if (project != null) {
+                new OpenProjectAction(application).openProject(project);
             }
         });
 


Mime
View raw message