Author: batosai
Date: 2008-08-14 20:47:48 +0000 (Thu, 14 Aug 2008)
New Revision: 21869
Modified:
trunk/apps/WoT/src/plugins/WoT/WoT.java
Log:
If all identity's trusters have been dropped or have no capacity, get the
identity out off this trust tree too.
Modified: trunk/apps/WoT/src/plugins/WoT/WoT.java
===================================================================
--- trunk/apps/WoT/src/plugins/WoT/WoT.java 2008-08-14 20:26:23 UTC (rev
21868)
+++ trunk/apps/WoT/src/plugins/WoT/WoT.java 2008-08-14 20:47:48 UTC (rev
21869)
@@ -127,7 +127,16 @@
}
- if(newRank == -1) return; // None of the trusters was in the
trust tree, this identity isn't either
+ if(newRank == -1) { // None of the trusters had capacity in
that trust tree, this identity isn't either
+ try {
+ score = identity.getScore(treeOwner, db);
+ db.delete(score); // We get this identity out
of the trust tree
+ }catch (NotInTrustTreeException e) {
+ // Nothing to do
+ }
+ return;
+ }
+
else newRank++; // We don't want to give the trustee the same
rank as the truster, right ?
if((newScore > 0) && !hasNegativeTrust) {
if(newRank >= capacities.length) {