projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
No need to check for the stop job.
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
core
/
WebOfTrustUpdater.java
diff --git
a/src/main/java/net/pterodactylus/sone/core/WebOfTrustUpdater.java
b/src/main/java/net/pterodactylus/sone/core/WebOfTrustUpdater.java
index
2ed3487
..
ce68797
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/core/WebOfTrustUpdater.java
+++ b/
src/main/java/net/pterodactylus/sone/core/WebOfTrustUpdater.java
@@
-230,7
+230,7
@@
public class WebOfTrustUpdater extends AbstractService {
while (!shouldStop()) {
try {
WebOfTrustUpdateJob updateJob = updateJobs.take();
while (!shouldStop()) {
try {
WebOfTrustUpdateJob updateJob = updateJobs.take();
- if (shouldStop()
|| (updateJob == stopJob)
) {
+ if (shouldStop()) {
break;
}
logger.log(Level.FINE, "Running Trust Update Job: " + updateJob);
break;
}
logger.log(Level.FINE, "Running Trust Update Job: " + updateJob);
@@
-332,7
+332,8
@@
public class WebOfTrustUpdater extends AbstractService {
*
* @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
*
* @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
- private class SetTrustJob extends WebOfTrustUpdateJob {
+ @VisibleForTesting
+ class SetTrustJob extends WebOfTrustUpdateJob {
/** The identity giving the trust. */
private final OwnIdentity truster;
/** The identity giving the trust. */
private final OwnIdentity truster;
@@
-372,11
+373,11
@@
public class WebOfTrustUpdater extends AbstractService {
public void run() {
try {
if (score != null) {
public void run() {
try {
if (score != null) {
- trustee.setTrust(truster, new Trust(score, null, 0));
webOfTrustConnector.setTrust(truster, trustee, score, comment);
webOfTrustConnector.setTrust(truster, trustee, score, comment);
+ trustee.setTrust(truster, new Trust(score, null, 0));
} else {
} else {
- trustee.removeTrust(truster);
webOfTrustConnector.removeTrust(truster, trustee);
webOfTrustConnector.removeTrust(truster, trustee);
+ trustee.removeTrust(truster);
}
finish(true);
} catch (WebOfTrustException wote1) {
}
finish(true);
} catch (WebOfTrustException wote1) {