diff options
Diffstat (limited to 'ecomp-sdk')
-rw-r--r-- | ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/utils/SwingWorker.java | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/utils/SwingWorker.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/utils/SwingWorker.java index 5058c064..a18cdc1c 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/utils/SwingWorker.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/gmap/utils/SwingWorker.java @@ -53,7 +53,6 @@ import javax.swing.SwingUtilities; */ public abstract class SwingWorker { private Object value; // see getValue(), setValue() - private Thread thread; /** * Class to maintain reference to current worker thread @@ -136,21 +135,17 @@ public abstract class SwingWorker { * and then exit. */ public SwingWorker() { - final Runnable doFinished = new Runnable() { - public void run() { finished(); } - }; - - Runnable doConstruct = new Runnable() { - public void run() { - try { - setValue(construct()); - } - finally { - threadVar.clear(); - } + final Runnable doFinished = () -> finished(); - SwingUtilities.invokeLater(doFinished); + Runnable doConstruct = () -> { + try { + setValue(construct()); } + finally { + threadVar.clear(); + } + + SwingUtilities.invokeLater(doFinished); }; Thread t = new Thread(doConstruct); |