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

[tor-commits] [metrics-lib/release] Deprecate setFailUnrecognizedDescriptorLines().



commit 091fc90e17bf9474ee47ea8179b439d76972e57d
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date:   Thu May 11 10:48:36 2017 +0200

    Deprecate setFailUnrecognizedDescriptorLines().
    
    Implements #22228.
---
 CHANGELOG.md                                                  | 4 ++++
 src/main/java/org/torproject/descriptor/DescriptorParser.java | 4 ++++
 src/main/java/org/torproject/descriptor/DescriptorReader.java | 4 ++++
 3 files changed, 12 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index e636780..8c3f09e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,10 @@
    - Fix a bug where DescriptorIndexCollector would not delete
      extraneous local files if remote paths start with /.
    - Add previously missing method to obtain the digest of a vote.
+   - Deprecated setFailUnrecognizedDescriptorLines() in
+     DescriptorParser and DescriptorReader and refer to
+     getUnrecognizedLines() in Descriptor if applications really need
+     to fail descriptors containing unrecognized lines.
 
  * Minor changes
    - Accept extra arguments in statistics-related extra-info
diff --git a/src/main/java/org/torproject/descriptor/DescriptorParser.java b/src/main/java/org/torproject/descriptor/DescriptorParser.java
index b2d5af1..537a259 100644
--- a/src/main/java/org/torproject/descriptor/DescriptorParser.java
+++ b/src/main/java/org/torproject/descriptor/DescriptorParser.java
@@ -30,6 +30,10 @@ public interface DescriptorParser {
    * versions.  But some applications may want to handle unrecognized
    * descriptor lines explicitly.</p>
    *
+   * @deprecated Removed in an attempt to simplify the interface.  Applications
+   *     that must fail descriptors with unrecognized lines can instead check
+   *     whether {@link Descriptor#getUnrecognizedLines()} returns any lines.
+   *
    * @since 1.0.0
    */
   public void setFailUnrecognizedDescriptorLines(
diff --git a/src/main/java/org/torproject/descriptor/DescriptorReader.java b/src/main/java/org/torproject/descriptor/DescriptorReader.java
index 32c26d1..85f8cdd 100644
--- a/src/main/java/org/torproject/descriptor/DescriptorReader.java
+++ b/src/main/java/org/torproject/descriptor/DescriptorReader.java
@@ -142,6 +142,10 @@ public interface DescriptorReader {
    * versions.  But some applications may want to handle unrecognized
    * descriptor lines explicitly.</p>
    *
+   * @deprecated Removed in an attempt to simplify the interface.  Applications
+   *     that must fail descriptors with unrecognized lines can instead check
+   *     whether {@link Descriptor#getUnrecognizedLines()} returns any lines.
+   *
    * @since 1.0.0
    */
   public void setFailUnrecognizedDescriptorLines();



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