[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [doctor/master] metrics-lib now returns null for no version recommendations.
commit f48bd96573471df5fada559e14accf3e60ec8892
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Tue Dec 13 12:48:18 2011 +0100
metrics-lib now returns null for no version recommendations.
---
src/org/torproject/doctor/Checker.java | 4 ++--
.../torproject/doctor/MetricsWebsiteReport.java | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/org/torproject/doctor/Checker.java b/src/org/torproject/doctor/Checker.java
index 795a730..ee4e29e 100755
--- a/src/org/torproject/doctor/Checker.java
+++ b/src/org/torproject/doctor/Checker.java
@@ -208,7 +208,7 @@ public class Checker {
SortedSet<String> unrecommendedClientVersions = new TreeSet<String>(),
unrecommendedServerVersions = new TreeSet<String>();
for (RelayNetworkStatusVote vote : this.downloadedVotes) {
- if (!vote.getRecommendedClientVersions().isEmpty() &&
+ if (vote.getRecommendedClientVersions() != null &&
!downloadedConsensus.getRecommendedClientVersions().equals(
vote.getRecommendedClientVersions())) {
StringBuilder message = new StringBuilder();
@@ -218,7 +218,7 @@ public class Checker {
}
unrecommendedClientVersions.add(message.toString());
}
- if (!vote.getRecommendedServerVersions().isEmpty() &&
+ if (vote.getRecommendedServerVersions() != null &&
!downloadedConsensus.getRecommendedServerVersions().equals(
vote.getRecommendedServerVersions())) {
StringBuilder message = new StringBuilder();
diff --git a/src/org/torproject/doctor/MetricsWebsiteReport.java b/src/org/torproject/doctor/MetricsWebsiteReport.java
index f4552e0..8d0bb0b 100755
--- a/src/org/torproject/doctor/MetricsWebsiteReport.java
+++ b/src/org/torproject/doctor/MetricsWebsiteReport.java
@@ -331,7 +331,7 @@ public class MetricsWebsiteReport {
for (RelayNetworkStatusVote vote : this.downloadedVotes.values()) {
SortedSet<String> voteRecommendedClientVersions =
vote.getRecommendedClientVersions();
- if (!voteRecommendedClientVersions.isEmpty()) {
+ if (voteRecommendedClientVersions != null) {
if (downloadedConsensus.getRecommendedClientVersions().equals(
voteRecommendedClientVersions)) {
this.bw.write(" <tr>\n"
@@ -359,7 +359,7 @@ public class MetricsWebsiteReport {
}
SortedSet<String> voteRecommendedServerVersions =
vote.getRecommendedServerVersions();
- if (!voteRecommendedServerVersions.isEmpty()) {
+ if (voteRecommendedServerVersions != null) {
if (downloadedConsensus.getRecommendedServerVersions().equals(
voteRecommendedServerVersions)) {
this.bw.write(" <tr>\n"
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits