X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=inline;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FGetSonesCommand.java;h=ec43143c4084aa4ad96b2a57d4196a57b85649fa;hb=1acab7994675db5fc17a7d242d7de0304efb6987;hp=fa805e1e99711996bc30e9ab51f352b21c0d3041;hpb=18423dd893c8d4f1ef7d3a82ae229f5544b7616e;p=Sone.git
diff --git a/src/main/java/net/pterodactylus/sone/fcp/GetSonesCommand.java b/src/main/java/net/pterodactylus/sone/fcp/GetSonesCommand.java
index fa805e1..ec43143 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â2019 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;
@@ -27,8 +29,6 @@ import freenet.support.SimpleFieldSet;
/**
* Implements the âGetSonesâ FCP command that returns the list of known Sones.
- *
- * @author David âBombeâ Roden
*/
public class GetSonesCommand extends AbstractSoneCommand {
@@ -49,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."));
}