From: David ‘Bombe’ Roden Date: Tue, 11 Feb 2020 17:03:45 +0000 (+0100) Subject: 🔥 Remove getInsertUri() method from Sone interface X-Git-Tag: v82^2~80 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=fc66bb049a3de0c3c12d5df53002a32cdf2ce6a5 🔥 Remove getInsertUri() method from Sone interface --- diff --git a/src/main/java/net/pterodactylus/sone/data/Sone.java b/src/main/java/net/pterodactylus/sone/data/Sone.java index b43d025..e2a7b5b 100644 --- a/src/main/java/net/pterodactylus/sone/data/Sone.java +++ b/src/main/java/net/pterodactylus/sone/data/Sone.java @@ -192,14 +192,6 @@ public interface Sone extends Identified, Fingerprintable, Comparable { FreenetURI getRequestUri(); /** - * Returns the insert URI of this Sone. - * - * @return The insert URI of this Sone - */ - @Nullable - FreenetURI getInsertUri(); - - /** * Returns the latest edition of this Sone. * * @return The latest edition of this Sone diff --git a/src/main/java/net/pterodactylus/sone/data/impl/IdOnlySone.java b/src/main/java/net/pterodactylus/sone/data/impl/IdOnlySone.java index e06e5a7..ddd96b9 100644 --- a/src/main/java/net/pterodactylus/sone/data/impl/IdOnlySone.java +++ b/src/main/java/net/pterodactylus/sone/data/impl/IdOnlySone.java @@ -53,11 +53,6 @@ public class IdOnlySone implements Sone { } @Override - public FreenetURI getInsertUri() { - return null; - } - - @Override public long getLatestEdition() { return 0; } diff --git a/src/main/java/net/pterodactylus/sone/data/impl/SoneImpl.java b/src/main/java/net/pterodactylus/sone/data/impl/SoneImpl.java index 1069550..ceb05b2 100644 --- a/src/main/java/net/pterodactylus/sone/data/impl/SoneImpl.java +++ b/src/main/java/net/pterodactylus/sone/data/impl/SoneImpl.java @@ -46,7 +46,6 @@ import net.pterodactylus.sone.data.SoneOptions; import net.pterodactylus.sone.data.SoneOptions.DefaultSoneOptions; import net.pterodactylus.sone.database.Database; import net.pterodactylus.sone.freenet.wot.Identity; -import net.pterodactylus.sone.freenet.wot.OwnIdentity; import freenet.keys.FreenetURI; @@ -191,26 +190,6 @@ public class SoneImpl implements Sone { } /** - * Returns the insert URI of this Sone. - * - * @return The insert URI of this Sone - */ - @Nullable - public FreenetURI getInsertUri() { - if (!isLocal()) { - return null; - } - try { - return new FreenetURI(((OwnIdentity) getIdentity()).getInsertUri()) - .setDocName("Sone") - .setMetaString(new String[0]) - .setSuggestedEdition(latestEdition); - } catch (MalformedURLException e) { - throw new IllegalStateException(format("Own identity %s's insert URI is incorrect.", getIdentity()), e); - } - } - - /** * Returns the latest edition of this Sone. * * @return The latest edition of this Sone