Remove unnecessary casts.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 3 Aug 2014 17:09:58 +0000 (19:09 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 3 Aug 2014 17:12:38 +0000 (19:12 +0200)
src/main/java/net/pterodactylus/sone/core/WebOfTrustUpdater.java

index aac4924..d9389b7 100644 (file)
@@ -372,14 +372,10 @@ public class WebOfTrustUpdater extends AbstractService {
                public void run() {
                        try {
                                if (score != null) {
-                                       if (trustee instanceof DefaultIdentity) {
-                                               ((DefaultIdentity) trustee).setTrust(truster, new Trust(score, null, 0));
-                                       }
+                                       trustee.setTrust(truster, new Trust(score, null, 0));
                                        webOfTrustConnector.setTrust(truster, trustee, score, comment);
                                } else {
-                                       if (trustee instanceof DefaultIdentity) {
-                                               ((DefaultIdentity) trustee).setTrust(truster, null);
-                                       }
+                                       trustee.setTrust(truster, null);
                                        webOfTrustConnector.removeTrust(truster, trustee);
                                }
                                finish(true);