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

[tor-commits] [metrics-web/master] Update to metrics-lib 1.7.0.



commit b3410f7f74df36042b3c061ddc66202a35f0dad2
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date:   Wed May 17 15:10:13 2017 +0200

    Update to metrics-lib 1.7.0.
    
    And while doing so, switch to streamlined digest methods to remove
    deprecation warnings.
---
 .../src/main/java/org/torproject/metrics/advbwdist/Main.java        | 2 +-
 .../org/torproject/ernie/cron/RelayDescriptorDatabaseImporter.java  | 6 +++---
 shared/build-base.xml                                               | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/advbwdist/src/main/java/org/torproject/metrics/advbwdist/Main.java b/modules/advbwdist/src/main/java/org/torproject/metrics/advbwdist/Main.java
index a3135c0..7193108 100644
--- a/modules/advbwdist/src/main/java/org/torproject/metrics/advbwdist/Main.java
+++ b/modules/advbwdist/src/main/java/org/torproject/metrics/advbwdist/Main.java
@@ -46,7 +46,7 @@ public class Main {
           continue;
         }
         ServerDescriptor serverDescriptor = (ServerDescriptor) descriptor;
-        String digest = serverDescriptor.getServerDescriptorDigest();
+        String digest = serverDescriptor.getDigestSha1Hex();
         long advertisedBandwidth = Math.min(Math.min(
             serverDescriptor.getBandwidthRate(),
             serverDescriptor.getBandwidthBurst()),
diff --git a/modules/legacy/src/main/java/org/torproject/ernie/cron/RelayDescriptorDatabaseImporter.java b/modules/legacy/src/main/java/org/torproject/ernie/cron/RelayDescriptorDatabaseImporter.java
index 657f0d7..a04f95f 100644
--- a/modules/legacy/src/main/java/org/torproject/ernie/cron/RelayDescriptorDatabaseImporter.java
+++ b/modules/legacy/src/main/java/org/torproject/ernie/cron/RelayDescriptorDatabaseImporter.java
@@ -892,13 +892,13 @@ public final class RelayDescriptorDatabaseImporter {
 
   private void addServerDescriptor(ServerDescriptor descriptor) {
     this.addServerDescriptorContents(
-        descriptor.getServerDescriptorDigest(), descriptor.getNickname(),
+        descriptor.getDigestSha1Hex(), descriptor.getNickname(),
         descriptor.getAddress(), descriptor.getOrPort(),
         descriptor.getDirPort(), descriptor.getFingerprint(),
         descriptor.getBandwidthRate(), descriptor.getBandwidthBurst(),
         descriptor.getBandwidthObserved(), descriptor.getPlatform(),
         descriptor.getPublishedMillis(), descriptor.getUptime(),
-        descriptor.getExtraInfoDigest());
+        descriptor.getExtraInfoDigestSha1Hex());
   }
 
   private void addExtraInfoDescriptor(ExtraInfoDescriptor descriptor) {
@@ -917,7 +917,7 @@ public final class RelayDescriptorDatabaseImporter {
       bandwidthHistoryLines.add(
           descriptor.getDirreqReadHistory().getLine());
     }
-    this.addExtraInfoDescriptorContents(descriptor.getExtraInfoDigest(),
+    this.addExtraInfoDescriptorContents(descriptor.getDigestSha1Hex(),
         descriptor.getNickname(),
         descriptor.getFingerprint().toLowerCase(),
         descriptor.getPublishedMillis(), bandwidthHistoryLines);
diff --git a/shared/build-base.xml b/shared/build-base.xml
index e9db803..c6f9920 100644
--- a/shared/build-base.xml
+++ b/shared/build-base.xml
@@ -8,7 +8,7 @@
   <property name="classes" value="${generated}/classes/"/>
   <property name="testclasses" value="${generated}/test-classes/"/>
   <property name="source-and-target-java-version" value="1.7" />
-  <property name="descriptorversion" value="1.6.0" />
+  <property name="descriptorversion" value="1.7.0" />
 
   <path id="base.classpath">
     <pathelement path="${classes}"/>

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