X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FGetSonesCommand.java;h=83167cdd6826104bab7b33628699048237b4de0b;hp=96861eaf306010e85891076988c379975f23e0c3;hb=438378deab1514f0f608d975ef65f5b7aea44ccb;hpb=62573c314957b1851f4fbe693b8746686caa940a diff --git a/src/main/java/net/pterodactylus/sone/fcp/GetSonesCommand.java b/src/main/java/net/pterodactylus/sone/fcp/GetSonesCommand.java index 96861ea..83167cd 100644 --- a/src/main/java/net/pterodactylus/sone/fcp/GetSonesCommand.java +++ b/src/main/java/net/pterodactylus/sone/fcp/GetSonesCommand.java @@ -1,5 +1,5 @@ /* - * Sone - GetSonesCommand.java - Copyright © 2011–2016 David Roden + * Sone - GetSonesCommand.java - Copyright © 2011–2020 David Roden * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,6 +17,8 @@ package net.pterodactylus.sone.fcp; +import static net.pterodactylus.sone.fcp.AbstractSoneCommandKt.encodeSones; + import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -47,7 +49,7 @@ public class GetSonesCommand extends AbstractSoneCommand { public Response execute(SimpleFieldSet parameters) { int startSone = getInt(parameters, "StartSone", 0); int maxSones = getInt(parameters, "MaxSones", -1); - List sones = new ArrayList(getCore().getSones()); + List sones = new ArrayList<>(getCore().getSones()); if (sones.size() < startSone) { return new Response("Sones", encodeSones(Collections. emptyList(), "Sones.")); }