}
/**
- * Adds the given context to the given own identity.
- *
- * @param ownIdentity
- * The own identity to add the context to
- * @param context
- * The context to add
- */
- public void addContext(OwnIdentity ownIdentity, String context) {
- addContextWait(ownIdentity, context, false);
- }
-
- /**
* Adds the given context to the given own identity, waiting for completion of
* the operation.
*
while (!shouldStop()) {
try {
WebOfTrustUpdateJob updateJob = updateJobs.take();
- if (shouldStop() || (updateJob == stopJob)) {
+ if (shouldStop()) {
break;
}
logger.log(Level.FINE, "Running Trust Update Job: " + updateJob);
*
* @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;
public void run() {
try {
if (score != null) {
- trustee.setTrust(truster, new Trust(score, null, 0));
webOfTrustConnector.setTrust(truster, trustee, score, comment);
+ trustee.setTrust(truster, new Trust(score, null, 0));
} else {
- trustee.removeTrust(truster);
webOfTrustConnector.removeTrust(truster, trustee);
+ trustee.removeTrust(truster);
}
finish(true);
} catch (WebOfTrustException wote1) {