X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fcore%2FWebOfTrustUpdaterImpl.java;h=809ca2079c93249822752624307dad8de2e7b173;hb=b9fc06f5bf20b1c0d5e7c5e9b49e87581a843ee7;hp=8a6d08300fa0e63d741680b89aeb4b283838f6c5;hpb=5bcdc1b924c598b1e59551d44e2302ef29258dad;p=Sone.git
diff --git a/src/main/java/net/pterodactylus/sone/core/WebOfTrustUpdaterImpl.java b/src/main/java/net/pterodactylus/sone/core/WebOfTrustUpdaterImpl.java
index 8a6d083..809ca20 100644
--- a/src/main/java/net/pterodactylus/sone/core/WebOfTrustUpdaterImpl.java
+++ b/src/main/java/net/pterodactylus/sone/core/WebOfTrustUpdaterImpl.java
@@ -1,5 +1,5 @@
/*
- * Sone - WebOfTrustUpdater.java - Copyright © 2013 David Roden
+ * Sone - WebOfTrustUpdaterImpl.java - Copyright © 2013â2019 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
@@ -18,6 +18,7 @@
package net.pterodactylus.sone.core;
import static com.google.common.base.Preconditions.checkNotNull;
+import static java.util.logging.Logger.getLogger;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
@@ -30,7 +31,6 @@ import net.pterodactylus.sone.freenet.wot.OwnIdentity;
import net.pterodactylus.sone.freenet.wot.Trust;
import net.pterodactylus.sone.freenet.wot.WebOfTrustConnector;
import net.pterodactylus.sone.freenet.wot.WebOfTrustException;
-import net.pterodactylus.util.logging.Logging;
import net.pterodactylus.util.service.AbstractService;
import com.google.common.annotations.VisibleForTesting;
@@ -40,14 +40,12 @@ import com.google.inject.Singleton;
/**
* Updates WebOfTrust identity data in a background thread because communicating
* with the WebOfTrust plugin can potentially last quite long.
- *
- * @author David âBombeâ Roden
*/
@Singleton
public class WebOfTrustUpdaterImpl extends AbstractService implements WebOfTrustUpdater {
/** The logger. */
- private static final Logger logger = Logging.getLogger(WebOfTrustUpdaterImpl.class);
+ private static final Logger logger = getLogger(WebOfTrustUpdaterImpl.class.getName());
/** Stop job. */
@SuppressWarnings("synthetic-access")
@@ -57,7 +55,7 @@ public class WebOfTrustUpdaterImpl extends AbstractService implements WebOfTrust
private final WebOfTrustConnector webOfTrustConnector;
/** The queue for jobs. */
- private final BlockingQueue updateJobs = new LinkedBlockingQueue();
+ private final BlockingQueue updateJobs = new LinkedBlockingQueue<>();
/**
* Creates a new trust updater.
@@ -229,8 +227,6 @@ public class WebOfTrustUpdaterImpl extends AbstractService implements WebOfTrust
/**
* Base class for WebOfTrust update jobs.
- *
- * @author David âBombeâ Roden
*/
@VisibleForTesting
class WebOfTrustUpdateJob implements Runnable {
@@ -302,8 +298,6 @@ public class WebOfTrustUpdaterImpl extends AbstractService implements WebOfTrust
/**
* Update job that sets the trust relation between two identities.
- *
- * @author David âBombeâ Roden
*/
@VisibleForTesting
class SetTrustJob extends WebOfTrustUpdateJob {
@@ -389,8 +383,6 @@ public class WebOfTrustUpdaterImpl extends AbstractService implements WebOfTrust
/**
* Base class for context updates of an {@link OwnIdentity}.
- *
- * @author David âBombeâ Roden
*/
@VisibleForTesting
class WebOfTrustContextUpdateJob extends WebOfTrustUpdateJob {
@@ -445,8 +437,6 @@ public class WebOfTrustUpdaterImpl extends AbstractService implements WebOfTrust
/**
* Job that adds a context to an {@link OwnIdentity}.
- *
- * @author David âBombeâ Roden
*/
@VisibleForTesting
class AddContextJob extends WebOfTrustContextUpdateJob {
@@ -481,8 +471,6 @@ public class WebOfTrustUpdaterImpl extends AbstractService implements WebOfTrust
/**
* Job that removes a context from an {@link OwnIdentity}.
- *
- * @author David âBombeâ Roden
*/
@VisibleForTesting
class RemoveContextJob extends WebOfTrustContextUpdateJob {
@@ -517,8 +505,6 @@ public class WebOfTrustUpdaterImpl extends AbstractService implements WebOfTrust
/**
* WebOfTrust update job that sets a property on an {@link OwnIdentity}.
- *
- * @author David âBombeâ Roden
*/
@VisibleForTesting
class SetPropertyJob extends WebOfTrustUpdateJob {