commit ab7199080b7e0afe791b51bb2b47f79fc0d418fe Author: Karsten Loesing karsten.loesing@gmx.net Date: Tue Sep 4 20:35:19 2018 +0200
Remove previously deprecated "as_number" field.
Still related to #23713. --- CHANGELOG.md | 2 ++ .../org/torproject/onionoo/docs/DetailsDocument.java | 19 ------------------- .../torproject/onionoo/server/ResponseBuilder.java | 3 --- .../onionoo/writer/DetailsDocumentWriter.java | 2 +- 4 files changed, 3 insertions(+), 23 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md index 34ec5b7..8f69f6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ - Change "3_months" graphs to "6_months" graphs in all documents containing history objects. - Remove the "fingerprint" parameter. + - Remove the previously deprecated "as_number" field from details + documents.
# Changes in version 6.2-1.17.1 - 2018-08-17 diff --git a/src/main/java/org/torproject/onionoo/docs/DetailsDocument.java b/src/main/java/org/torproject/onionoo/docs/DetailsDocument.java index 504f0b5..725474f 100644 --- a/src/main/java/org/torproject/onionoo/docs/DetailsDocument.java +++ b/src/main/java/org/torproject/onionoo/docs/DetailsDocument.java @@ -204,33 +204,14 @@ public class DetailsDocument extends Document {
private String as;
- @Deprecated - private String asNumber; - public void setAs(String as) { this.as = escapeJson(as); }
- @Deprecated - public void setAsNumber(String asNumber) { - this.asNumber = escapeJson(asNumber); - } - - @Deprecated - public void setAsAndAsNumber(String asNumber) { - this.as = escapeJson(asNumber); - this.asNumber = escapeJson(asNumber); - } - public String getAs() { return unescapeJson(this.as); }
- @Deprecated - public String getAsNumber() { - return unescapeJson(this.asNumber); - } - private String asName;
public void setAsName(String asName) { diff --git a/src/main/java/org/torproject/onionoo/server/ResponseBuilder.java b/src/main/java/org/torproject/onionoo/server/ResponseBuilder.java index f1f4af9..54d8dc5 100644 --- a/src/main/java/org/torproject/onionoo/server/ResponseBuilder.java +++ b/src/main/java/org/torproject/onionoo/server/ResponseBuilder.java @@ -299,9 +299,6 @@ public class ResponseBuilder { case "as": dd.setAs(detailsDocument.getAs()); break; - case "as_number": - dd.setAsNumber(detailsDocument.getAsNumber()); - break; case "as_name": dd.setAsName(detailsDocument.getAsName()); break; diff --git a/src/main/java/org/torproject/onionoo/writer/DetailsDocumentWriter.java b/src/main/java/org/torproject/onionoo/writer/DetailsDocumentWriter.java index 99b4e5d..d33ae4d 100644 --- a/src/main/java/org/torproject/onionoo/writer/DetailsDocumentWriter.java +++ b/src/main/java/org/torproject/onionoo/writer/DetailsDocumentWriter.java @@ -96,7 +96,7 @@ public class DetailsDocumentWriter implements DocumentWriter { detailsDocument.setCountryName(detailsStatus.getCountryName()); detailsDocument.setRegionName(detailsStatus.getRegionName()); detailsDocument.setCityName(detailsStatus.getCityName()); - detailsDocument.setAsAndAsNumber(detailsStatus.getAsNumber()); + detailsDocument.setAs(detailsStatus.getAsNumber()); detailsDocument.setAsName(detailsStatus.getAsName()); if (detailsStatus.isRunning()) { detailsDocument.setConsensusWeightFraction(
tor-commits@lists.torproject.org