X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FGetSoneCommand.java;h=2ad514fcdaec885c312f66a55abc87e746095d87;hp=d32bda6f4520db6d4db10b66ede6b69773f1fbc6;hb=419098bcd6215125408b29e60bd888e60979d37b;hpb=99888ce13cc17d49f5e217ab6f2c9ad5ef168792 diff --git a/src/main/java/net/pterodactylus/sone/fcp/GetSoneCommand.java b/src/main/java/net/pterodactylus/sone/fcp/GetSoneCommand.java index d32bda6..2ad514f 100644 --- a/src/main/java/net/pterodactylus/sone/fcp/GetSoneCommand.java +++ b/src/main/java/net/pterodactylus/sone/fcp/GetSoneCommand.java @@ -1,5 +1,5 @@ /* - * Sone - GetSoneCommand.java - Copyright © 2011–2013 David Roden + * Sone - GetSoneCommand.java - Copyright © 2011–2015 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 @@ -21,6 +21,9 @@ import net.pterodactylus.sone.core.Core; import net.pterodactylus.sone.data.Profile; import net.pterodactylus.sone.data.Sone; import net.pterodactylus.sone.freenet.fcp.FcpException; + +import com.google.common.base.Optional; + import freenet.support.SimpleFieldSet; import freenet.support.api.Bucket; @@ -48,7 +51,7 @@ public class GetSoneCommand extends AbstractSoneCommand { @Override public Response execute(SimpleFieldSet parameters, Bucket data, AccessType accessType) throws FcpException { Sone sone = getSone(parameters, "Sone", false); - Sone localSone = getSone(parameters, "LocalSone", false, false); + Optional localSone = getSone(parameters, "LocalSone", false, false); return new Response("Sone", encodeSone(sone, "", localSone)); }