Author: pmouawad Date: Sat Sep 16 21:16:41 2017 New Revision: 1808591 URL: http://svn.apache.org/viewvc?rev=1808591&view=rev Log: Use lambda
Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/RenderInBrowser.java Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/RenderInBrowser.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/RenderInBrowser.java?rev=1808591&r1=1808590&r2=1808591&view=diff ============================================================================== --- jmeter/trunk/src/components/org/apache/jmeter/visualizers/RenderInBrowser.java (original) +++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/RenderInBrowser.java Sat Sep 16 21:16:41 2017 @@ -112,9 +112,7 @@ public class RenderInBrowser extends Sam private void createScene(final String htmlContent) { Platform.setImplicitExit(false); - Platform.runLater(new Runnable() { - @Override - public void run() { + Platform.runLater(() -> { WebView view = new WebView(); engine = view.getEngine(); @@ -126,12 +124,8 @@ public class RenderInBrowser extends Sam .invokeLater(() -> progressBar.setValue(newValue.intValue()))); engine.getLoadWorker().exceptionProperty() - .addListener(new ChangeListener<Throwable>() { - - @Override - public void changed( - ObservableValue<? extends Throwable> o, - Throwable old, final Throwable value) { + .addListener((ObservableValue<? extends Throwable> o, + Throwable old, final Throwable value) -> { if (engine.getLoadWorker().getState() == State.FAILED) { SwingUtilities.invokeLater(() -> JOptionPane .showMessageDialog( @@ -145,10 +139,8 @@ public class RenderInBrowser extends Sam "Loading error...", JOptionPane.ERROR_MESSAGE)); } - } }); jfxPanel.setScene(new Scene(view)); - } }); }