From 87dca7f844f20969311cdcbd4392a275ae8e9936 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Wed, 22 Jun 2016 10:40:15 +0200 Subject: [PATCH] Shortend some annonymous-class-expressions by using lambda-expressions --- .../java/de/juplo/jackson/SimpleMapper.java | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/main/java/de/juplo/jackson/SimpleMapper.java b/src/main/java/de/juplo/jackson/SimpleMapper.java index f15bf25..914fd5f 100644 --- a/src/main/java/de/juplo/jackson/SimpleMapper.java +++ b/src/main/java/de/juplo/jackson/SimpleMapper.java @@ -117,14 +117,7 @@ public abstract class SimpleMapper if (next != null) return true; - return spliterator.tryAdvance(new Consumer() - { - @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>() - { - @Override - public void accept(Entry e) - { - next = e; - } - }); + return spliterator.tryAdvance((Entry e) -> { next = e; }); } @Override -- 2.20.1