From de322b9ebc0493527812f6542e9a5d8566fdc479 Mon Sep 17 00:00:00 2001 From: Maschell Date: Wed, 10 Apr 2019 17:59:02 +0200 Subject: [PATCH] Use a lambda expression to simplify the sorting in WUDPartitionHeader --- .../implementations/wud/parser/WUDPartitionHeader.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/de/mas/wiiu/jnus/implementations/wud/parser/WUDPartitionHeader.java b/src/de/mas/wiiu/jnus/implementations/wud/parser/WUDPartitionHeader.java index 8a2f72d..be3622e 100644 --- a/src/de/mas/wiiu/jnus/implementations/wud/parser/WUDPartitionHeader.java +++ b/src/de/mas/wiiu/jnus/implementations/wud/parser/WUDPartitionHeader.java @@ -72,12 +72,7 @@ public final class WUDPartitionHeader { // We have to make sure, that the list is ordered by index List contents = new ArrayList<>(allContents.values()); - Collections.sort(contents, new Comparator() { - @Override - public int compare(Content o1, Content o2) { - return Short.compare(o1.getIndex(), o2.getIndex()); - } - }); + Collections.sort(contents, (o1, o2) -> Short.compare(o1.getIndex(), o2.getIndex())); for (Content c : allContents.values()) { if (!c.isHashed() || !c.isEncrypted()) {