[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [metrics-lib/master] Deprecate three classes using HttpURLConnection.



commit 05020464627e379c8de86c80d466f814bd6fe20a
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date:   Tue Feb 14 10:48:28 2017 +0100

    Deprecate three classes using HttpURLConnection.
    
    Fixes #20323.
---
 CHANGELOG.md                                                      | 6 ++++++
 src/main/java/org/torproject/descriptor/DescriptorDownloader.java | 3 +++
 src/main/java/org/torproject/descriptor/DescriptorRequest.java    | 4 ++++
 .../org/torproject/descriptor/impl/DescriptorCollectorImpl.java   | 8 ++++++++
 4 files changed, 21 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index a760143..b79df01 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
 # Changes in version 1.6.0 - 2016-??-??
 
+ * Major changes
+   - Deprecate DescriptorDownloader in favor of the much more widely
+     used DescriptorCollector.
+
  * Medium changes
    - Add two methods for loading and saving a parse history file in
      the descriptor reader to avoid situations where applications fail
@@ -17,6 +21,8 @@
      entries, and "(recommended|required)-(client|relay)-protocols"
      lines in consensuses and votes.
    - Parse "shared-rand-.*" lines in consensuses and votes.
+   - Deprecate DescriptorCollectorImpl now that
+     DescriptorIndexCollector is the default.
 
 
 # Changes in version 1.5.0 - 2016-10-19
diff --git a/src/main/java/org/torproject/descriptor/DescriptorDownloader.java b/src/main/java/org/torproject/descriptor/DescriptorDownloader.java
index f3335f4..52b25bf 100644
--- a/src/main/java/org/torproject/descriptor/DescriptorDownloader.java
+++ b/src/main/java/org/torproject/descriptor/DescriptorDownloader.java
@@ -14,6 +14,9 @@ import java.util.Set;
  * setting any configuration options and initiating the download
  * process.</p>
  *
+ * @deprecated Removed as descriptor source in favor of the much more widely
+ *     used {@link DescriptorCollector}.
+ *
  * @since 1.0.0
  */
 public interface DescriptorDownloader {
diff --git a/src/main/java/org/torproject/descriptor/DescriptorRequest.java b/src/main/java/org/torproject/descriptor/DescriptorRequest.java
index 0927339..9009ca8 100644
--- a/src/main/java/org/torproject/descriptor/DescriptorRequest.java
+++ b/src/main/java/org/torproject/descriptor/DescriptorRequest.java
@@ -15,6 +15,10 @@ import java.util.List;
  * {@link Descriptor} interface.  This container also stores potentially
  * useful meta-data about the descriptor request.</p>
  *
+ * @deprecated Removed as descriptor container together with
+ *     {@link DescriptorDownloader} in favor of the much more widely used
+ *     {@link DescriptorCollector}.
+ *
  * @since 1.0.0
  */
 public interface DescriptorRequest {
diff --git a/src/main/java/org/torproject/descriptor/impl/DescriptorCollectorImpl.java b/src/main/java/org/torproject/descriptor/impl/DescriptorCollectorImpl.java
index c3c0fac..214227f 100644
--- a/src/main/java/org/torproject/descriptor/impl/DescriptorCollectorImpl.java
+++ b/src/main/java/org/torproject/descriptor/impl/DescriptorCollectorImpl.java
@@ -32,6 +32,14 @@ import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import java.util.zip.GZIPInputStream;
 
+/**
+ * Download files from a CollecTor instance based on the remote instance's
+ * directory listings.
+ *
+ * @deprecated Replaced by {@link DescriptorIndexCollector} which uses the
+ *     remote instance's index.json file as a more robust alternative to parsing
+ *     the remote instance's directory listings.
+ */
 public class DescriptorCollectorImpl implements DescriptorCollector {
 
   private static Logger log = LoggerFactory

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits