Ah, hang on, I already have temp commits for using metrics-lib 1.9.0 in several applications here. I didn't know you were working on this. Let me push and share my temp branches here in a minute!
Ah, hang on, I already have temp commits for using metrics-lib 1.9.0 in several applications here. I didn't know you were working on this. Let me push and share my temp branches here in a minute!
The above branch is simply making the tests compile, not using any new ml-190 features.
There, I just pushed task-22141 branches to my Onionoo, metrics-web, and ExoneraTor repositories. Feel free to ignore them for the moment. I'm just trying to avoid duplicate work here.
Please review my branch task-22681 which is an improved version of my branch above (and which also contains a variant of your patch to make tests compile again).
I'd like to have more explicit code here, where a null value signals the end of the loop sort of indirectly. Knowing that this also is a matter of taste a first suggestion for more obvious code:
diff --git a/src/main/java/org/torproject/onionoo/updater/DescriptorQueue.java b/src/main/java/org/torproject/onionoo/updater/DescriptorQueue.javaindex ae68b41..9e49840 100644--- a/src/main/java/org/torproject/onionoo/updater/DescriptorQueue.java+++ b/src/main/java/org/torproject/onionoo/updater/DescriptorQueue.java@@ -129,6 +129,7 @@ class DescriptorQueue { } }+ /** Returns the next parseable Descriptor. */ public Descriptor nextDescriptor() { Descriptor nextDescriptor = null; if (null == this.descriptors) {@@ -143,14 +144,13 @@ class DescriptorQueue { return null; } }- while (null == nextDescriptor && this.descriptors.hasNext()) {+ while (this.descriptors.hasNext()) { nextDescriptor = this.descriptors.next();- if (nextDescriptor instanceof UnparseableDescriptor) {- nextDescriptor = null;- continue;+ if (!(nextDescriptor instanceof UnparseableDescriptor)) {+ this.returnedDescriptors++;+ this.returnedBytes += nextDescriptor.getRawDescriptorLength();+ break; }- this.returnedDescriptors++;- this.returnedBytes += nextDescriptor.getRawDescriptorLength(); } return nextDescriptor; }
All in all merge ready after a change regarding the above topic.
Again, the changes are not at all covered by test, i.e., more intensive pre-deployment-testing is necessary (new ticket).