Remove another unnecessary class.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 12 Sep 2013 04:35:13 +0000 (06:35 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 12 Sep 2013 04:35:13 +0000 (06:35 +0200)
src/main/java/net/pterodactylus/sone/core/WebOfTrustUpdater.java

index b8060d4..ac38571 100644 (file)
@@ -559,72 +559,17 @@ public class WebOfTrustUpdater extends AbstractService {
        }
 
        /**
-        * Base class for update jobs that deal with properties.
+        * WebOfTrust update job that sets a property on an {@link OwnIdentity}.
         *
         * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
         */
-       private class WebOfTrustPropertyUpdateJob extends WebOfTrustUpdateJob {
+       private class SetPropertyJob extends WebOfTrustUpdateJob {
 
                /** The own identity to update properties on. */
-               protected final OwnIdentity ownIdentity;
+               private final OwnIdentity ownIdentity;
 
                /** The name of the property to update. */
-               protected final String propertyName;
-
-               /**
-                * Creates a new property update job.
-                *
-                * @param ownIdentity
-                *            The own identity to update the property on
-                * @param propertyName
-                *            The name of the property to update
-                */
-               @SuppressWarnings("synthetic-access")
-               public WebOfTrustPropertyUpdateJob(OwnIdentity ownIdentity, String propertyName) {
-                       this.ownIdentity = ownIdentity;
-                       this.propertyName = propertyName;
-               }
-
-               //
-               // OBJECT METHODS
-               //
-
-               /**
-                * {@inheritDoc}
-                */
-               @Override
-               public boolean equals(Object object) {
-                       if ((object == null) || !object.getClass().equals(getClass())) {
-                               return false;
-                       }
-                       WebOfTrustPropertyUpdateJob updateJob = (WebOfTrustPropertyUpdateJob) object;
-                       return updateJob.ownIdentity.equals(ownIdentity) && updateJob.propertyName.equals(propertyName);
-               }
-
-               /**
-                * {@inheritDoc}
-                */
-               @Override
-               public int hashCode() {
-                       return getClass().hashCode() ^ ownIdentity.hashCode() ^ propertyName.hashCode();
-               }
-
-               /**
-                * {@inheritDoc}
-                */
-               @Override
-               public String toString() {
-                       return String.format("%s[ownIdentity=%s,propertyName=%s]", getClass().getSimpleName(), ownIdentity, propertyName);
-               }
-
-       }
-
-       /**
-        * WebOfTrust update job that sets a property on an {@link OwnIdentity}.
-        *
-        * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
-        */
-       private class SetPropertyJob extends WebOfTrustPropertyUpdateJob {
+               private final String propertyName;
 
                /** The value of the property to set. */
                private final String propertyValue;
@@ -665,6 +610,32 @@ public class WebOfTrustUpdater extends AbstractService {
                        }
                }
 
+               //
+               // OBJECT METHODS
+               //
+
+               /** {@inheritDoc} */
+               @Override
+               public boolean equals(Object object) {
+                       if ((object == null) || !object.getClass().equals(getClass())) {
+                               return false;
+                       }
+                       SetPropertyJob updateJob = (SetPropertyJob) object;
+                       return updateJob.ownIdentity.equals(ownIdentity) && updateJob.propertyName.equals(propertyName);
+               }
+
+               /** {@inheritDoc} */
+               @Override
+               public int hashCode() {
+                       return getClass().hashCode() ^ ownIdentity.hashCode() ^ propertyName.hashCode();
+               }
+
+               /** {@inheritDoc} */
+               @Override
+               public String toString() {
+                       return String.format("%s[ownIdentity=%s,propertyName=%s]", getClass().getSimpleName(), ownIdentity, propertyName);
+               }
+
        }
 
 }