Shortend some annonymous-class-expressions by using lambda-expressions
authorKai Moritz <kai@juplo.de>
Wed, 22 Jun 2016 08:40:15 +0000 (10:40 +0200)
committerKai Moritz <kai@juplo.de>
Wed, 22 Jun 2016 08:40:15 +0000 (10:40 +0200)
src/main/java/de/juplo/jackson/SimpleMapper.java

index f15bf25..914fd5f 100644 (file)
@@ -117,14 +117,7 @@ public abstract class SimpleMapper
         if (next != null)
           return true;
 
-        return spliterator.tryAdvance(new Consumer<Object>()
-        {
-          @Override
-          public void accept(Object o)
-          {
-            next = o;
-          }
-        });
+        return spliterator.tryAdvance((Object o) -> { next = o; });
       }
 
       @Override
@@ -249,14 +242,7 @@ public abstract class SimpleMapper
         if (next != null)
           return true;
 
-        return spliterator.tryAdvance(new Consumer<Entry<String, Object>>()
-        {
-          @Override
-          public void accept(Entry<String, Object> e)
-          {
-            next = e;
-          }
-        });
+        return spliterator.tryAdvance((Entry<String, Object> e) -> { next = e; });
       }
 
       @Override