Ignore:
Timestamp:
2016-07-23T18:46:45+02:00 (10 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/history/HistoryBrowserDialogManager.java

    r10345 r10611  
    196196        }
    197197
    198         Runnable r = new Runnable() {
    199 
    200             @Override
    201             public void run() {
    202                 try {
    203                     for (PrimitiveId p : notNewPrimitives) {
    204                         final History h = HistoryDataSet.getInstance().getHistory(p);
    205                         if (h == null) {
    206                             continue;
    207                         }
    208                         SwingUtilities.invokeLater(new Runnable() {
    209                             @Override
    210                             public void run() {
    211                                 show(h);
    212                             }
    213                         });
     198        Runnable r = () -> {
     199            try {
     200                for (PrimitiveId p : notNewPrimitives) {
     201                    final History h = HistoryDataSet.getInstance().getHistory(p);
     202                    if (h == null) {
     203                        continue;
    214204                    }
    215                 } catch (final RuntimeException e) {
    216                     BugReportExceptionHandler.handleException(e);
     205                    SwingUtilities.invokeLater(() -> show(h));
    217206                }
     207            } catch (final RuntimeException e) {
     208                BugReportExceptionHandler.handleException(e);
    218209            }
    219210        };
     
    237228    };
    238229
    239     private final Predicate<PrimitiveId> notNewPredicate = new Predicate<PrimitiveId>() {
    240 
    241         @Override
    242         public boolean evaluate(PrimitiveId p) {
    243             return !p.isNew();
    244         }
    245     };
     230    private final Predicate<PrimitiveId> notNewPredicate = p -> !p.isNew();
    246231}
Note: See TracChangeset for help on using the changeset viewer.