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

[tor-commits] [metrics-lib/master] Retain trailing newline in Torperf results.



commit 44e1c2566b954834bb39c8e1e3aa994a62d98f06
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date:   Thu Jul 13 11:34:11 2017 +0200

    Retain trailing newline in Torperf results.
    
    Fixes #22912.
---
 CHANGELOG.md                                                        | 3 +++
 src/main/java/org/torproject/descriptor/impl/TorperfResultImpl.java | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1b27d12..a294c62 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,9 @@
      Apache Commons Compress 1.13, Apache Commons Lang 3.5, Google
      Gson 2.4, JUnit 4.12, Logback 1.1.9, SLF4J 1.7.22, and XZ 1.6.
 
+ * Minor changes
+   - Retain trailing newline in Torperf results.
+
 
 # Changes in version 2.0.0 - 2017-06-28
 
diff --git a/src/main/java/org/torproject/descriptor/impl/TorperfResultImpl.java b/src/main/java/org/torproject/descriptor/impl/TorperfResultImpl.java
index 408b08c..65b9117 100644
--- a/src/main/java/org/torproject/descriptor/impl/TorperfResultImpl.java
+++ b/src/main/java/org/torproject/descriptor/impl/TorperfResultImpl.java
@@ -49,7 +49,7 @@ public class TorperfResultImpl extends DescriptorImpl
       } else {
         /* XXX21932 */
         parsedDescriptors.add(new TorperfResultImpl(
-            (typeAnnotation + line).getBytes(StandardCharsets.UTF_8),
+            (typeAnnotation + line + "\n").getBytes(StandardCharsets.UTF_8),
             descriptorFile));
         typeAnnotation = "";
       }



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