[tor-commits] [onionoo/master] Fix serialization using Gson.
karsten at torproject.org
karsten at torproject.org
Mon Apr 14 13:29:25 UTC 2014
commit 234efb3cdd573b39c5275e3239eb6532affcc1ff
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date: Tue Apr 8 07:04:31 2014 +0200
Fix serialization using Gson.
We never hit this bug, because so far we never serialized anything using
Gson.
---
src/org/torproject/onionoo/DocumentStore.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/org/torproject/onionoo/DocumentStore.java b/src/org/torproject/onionoo/DocumentStore.java
index fa0e98c..95f8f93 100644
--- a/src/org/torproject/onionoo/DocumentStore.java
+++ b/src/org/torproject/onionoo/DocumentStore.java
@@ -195,7 +195,7 @@ public class DocumentStore {
document instanceof ClientsDocument ||
document instanceof UptimeDocument) {
Gson gson = new Gson();
- documentString = gson.toJson(this);
+ documentString = gson.toJson(document);
} else if (document instanceof BandwidthStatus ||
document instanceof WeightsStatus ||
document instanceof ClientsStatus ||
More information about the tor-commits
mailing list