Don’t set the latest edition from the WoT URI!
[Sone.git] / src / main / java / net / pterodactylus / sone / data / Sone.java
index 0afbf3b..3ff0d3b 100644 (file)
@@ -183,7 +183,6 @@ public class Sone {
                        logger.log(Level.WARNING, "Request URI %s tried to overwrite %s!", new Object[] { requestUri, this.requestUri });
                        return this;
                }
-               setLatestEdition(requestUri.getEdition());
                return this;
        }
 
@@ -193,7 +192,7 @@ public class Sone {
         * @return The insert URI of this Sone
         */
        public FreenetURI getInsertUri() {
-               return insertUri.setSuggestedEdition(latestEdition);
+               return (insertUri != null) ? insertUri.setSuggestedEdition(latestEdition) : null;
        }
 
        /**
@@ -212,7 +211,6 @@ public class Sone {
                        logger.log(Level.WARNING, "Request URI %s tried to overwrite %s!", new Object[] { insertUri, this.insertUri });
                        return this;
                }
-               setLatestEdition(insertUri.getEdition());
                return this;
        }
 
@@ -422,7 +420,6 @@ public class Sone {
         * @return All replies this Sone made
         */
        public Set<Reply> getReplies() {
-               logger.log(Level.FINEST, "Friends of %s: %s", new Object[] { this, friendSones });
                return Collections.unmodifiableSet(replies);
        }