Remove method with implicit “create” parameter, use parameter explicitely.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 18 Nov 2011 18:02:05 +0000 (19:02 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 18 Nov 2011 18:02:05 +0000 (19:02 +0100)
src/main/java/net/pterodactylus/sone/core/Core.java

index 09e46b3..ea4fef7 100644 (file)
@@ -509,17 +509,6 @@ public class Core extends AbstractService implements IdentityListener, UpdateLis
         *
         * @param id
         *            The ID of the remote Sone to get
-        * @return The Sone with the given ID
-        */
-       public Sone getRemoteSone(String id) {
-               return getRemoteSone(id, true);
-       }
-
-       /**
-        * Returns the remote Sone with the given ID.
-        *
-        * @param id
-        *            The ID of the remote Sone to get
         * @param create
         *            {@code true} to always create a Sone, {@code false} to return
         *            {@code null} if no Sone with the given ID exists
@@ -1050,7 +1039,7 @@ public class Core extends AbstractService implements IdentityListener, UpdateLis
                        return null;
                }
                synchronized (remoteSones) {
-                       final Sone sone = getRemoteSone(identity.getId()).setIdentity(identity);
+                       final Sone sone = getRemoteSone(identity.getId(), true).setIdentity(identity);
                        boolean newSone = sone.getRequestUri() == null;
                        sone.setRequestUri(getSoneUri(identity.getRequestUri()));
                        sone.setLatestEdition(Numbers.safeParseLong(identity.getProperty("Sone.LatestEdition"), (long) 0));
@@ -2564,7 +2553,7 @@ public class Core extends AbstractService implements IdentityListener, UpdateLis
                        @Override
                        @SuppressWarnings("synthetic-access")
                        public void run() {
-                               Sone sone = getRemoteSone(identity.getId());
+                               Sone sone = getRemoteSone(identity.getId(), false);
                                sone.setIdentity(identity);
                                sone.setLatestEdition(Numbers.safeParseLong(identity.getProperty("Sone.LatestEdition"), sone.getLatestEdition()));
                                soneDownloader.addSone(sone);