Author: batosai
Date: 2008-09-05 16:54:35 +0000 (Fri, 05 Sep 2008)
New Revision: 22469
Modified:
trunk/apps/WoT/src/plugins/WoT/Identity.java
Log:
Oops again. Identities can't give their rank if they have no capacity.
Modified: trunk/apps/WoT/src/plugins/WoT/Identity.java
===================================================================
--- trunk/apps/WoT/src/plugins/WoT/Identity.java 2008-09-05 15:56:30 UTC
(rev 22468)
+++ trunk/apps/WoT/src/plugins/WoT/Identity.java 2008-09-05 16:54:35 UTC
(rev 22469)
@@ -240,8 +240,10 @@
while(receivedTrusts.hasNext()) {
Trust trust = receivedTrusts.next();
try {
- int trusterRank =
trust.getTruster().getScore(treeOwner, db).getRank();
- if(rank == -1 || trusterRank < rank) rank =
trusterRank;
+ Score score =
trust.getTruster().getScore(treeOwner, db);
+ if(score.getCapacity() != 0) // If the truster
has no capacity, he can't give his rank
+ if(rank == -1 || score.getRank() <
rank) // If the truster's rank is better than ours or if we have not
+ rank = score.getRank();
} catch (NotInTrustTreeException e) {}
}
return rank;