Ignore:
Timestamp:
2016-07-23T18:46:45+02:00 (8 years ago)
Author:
Don-vip
Message:

see #11390 - sonar - squid:S1604 - Java 8: Anonymous inner classes containing only one method should become lambdas

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java

    r10593 r10611  
    593593                final Command fixCommand = error.getFix();
    594594                if (fixCommand != null) {
    595                     SwingUtilities.invokeAndWait(new Runnable() {
    596                         @Override
    597                         public void run() {
    598                             Main.main.undoRedo.addNoRedraw(fixCommand);
    599                         }
    600                     });
     595                    SwingUtilities.invokeAndWait(() -> Main.main.undoRedo.addNoRedraw(fixCommand));
    601596                }
    602597                // It is wanted to ignore an error if it said fixable, even if fixCommand was null
     
    614609                final DataSet ds = Main.getLayerManager().getEditDataSet();
    615610                int i = 0;
    616                 SwingUtilities.invokeAndWait(new Runnable() {
    617                     @Override
    618                     public void run() {
    619                         ds.beginUpdate();
    620                     }
    621                 });
     611                SwingUtilities.invokeAndWait(ds::beginUpdate);
    622612                try {
    623613                    for (TestError error: testErrors) {
     
    630620                    }
    631621                } finally {
    632                     SwingUtilities.invokeAndWait(new Runnable() {
    633                         @Override
    634                         public void run() {
    635                             ds.endUpdate();
    636                         }
    637                     });
     622                    SwingUtilities.invokeAndWait(ds::endUpdate);
    638623                }
    639624                monitor.subTask(tr("Updating map ..."));
    640                 SwingUtilities.invokeAndWait(new Runnable() {
    641                     @Override
    642                     public void run() {
    643                         Main.main.undoRedo.afterAdd();
    644                         Main.map.repaint();
    645                         tree.resetErrors();
    646                         ds.fireSelectionChanged();
    647                     }
     625                SwingUtilities.invokeAndWait(() -> {
     626                    Main.main.undoRedo.afterAdd();
     627                    Main.map.repaint();
     628                    tree.resetErrors();
     629                    ds.fireSelectionChanged();
    648630                });
    649631            } catch (InterruptedException | InvocationTargetException e) {
    650                 // FIXME: signature of realRun should have a generic checked exception we
    651                 // could throw here
     632                // FIXME: signature of realRun should have a generic checked exception we could throw here
    652633                throw new RuntimeException(e);
    653634            } finally {
Note: See TracChangeset for help on using the changeset viewer.