Replace unnecessary type parameters with <>
[Sone.git] / src / main / java / net / pterodactylus / sone / freenet / wot / IdentityManagerImpl.java
index f568aa4..7d8d1e4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Sone - IdentityManager.java - Copyright © 2010–2013 David Roden
+ * Sone - IdentityManagerImpl.java - Copyright © 2010–2016 David Roden
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -17,6 +17,8 @@
 
 package net.pterodactylus.sone.freenet.wot;
 
+import static java.util.logging.Logger.getLogger;
+
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -26,7 +28,6 @@ import java.util.logging.Level;
 import java.util.logging.Logger;
 
 import net.pterodactylus.sone.freenet.plugin.PluginException;
-import net.pterodactylus.util.logging.Logging;
 import net.pterodactylus.util.service.AbstractService;
 
 import com.google.common.collect.Sets;
@@ -42,14 +43,12 @@ import com.google.inject.Singleton;
  * It is also responsible for polling identities from the Web of Trust plugin
  * and sending events to the {@link EventBus} when {@link Identity}s and
  * {@link OwnIdentity}s are discovered or disappearing.
- *
- * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
  */
 @Singleton
 public class IdentityManagerImpl extends AbstractService implements IdentityManager {
 
        /** The logger. */
-       private static final Logger logger = Logging.getLogger(IdentityManagerImpl.class);
+       private static final Logger logger = getLogger(IdentityManagerImpl.class.getName());
 
        /** The event bus. */
        private final EventBus eventBus;
@@ -108,7 +107,7 @@ public class IdentityManagerImpl extends AbstractService implements IdentityMana
        @Override
        public Set<OwnIdentity> getAllOwnIdentities() {
                synchronized (currentOwnIdentities) {
-                       return new HashSet<OwnIdentity>(currentOwnIdentities);
+                       return new HashSet<>(currentOwnIdentities);
                }
        }
 
@@ -121,7 +120,7 @@ public class IdentityManagerImpl extends AbstractService implements IdentityMana
         */
        @Override
        protected void serviceRun() {
-               Map<OwnIdentity, Collection<Identity>> oldIdentities = new HashMap<OwnIdentity, Collection<Identity>>();
+               Map<OwnIdentity, Collection<Identity>> oldIdentities = new HashMap<>();
 
                while (!shouldStop()) {
                        try {