commit ffc949ea54ce294c87b48b3ee8d08198a9e5d9b7 Author: Karsten Loesing karsten.loesing@gmx.net Date: Fri Nov 3 22:33:02 2017 +0100
Skip unrecognized descriptors when importing archives. --- CHANGELOG.md | 2 ++ src/main/java/org/torproject/onionoo/updater/DescriptorSource.java | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md index 74f29b7..12b0741 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@
* Medium changes - Support quoted qualified search terms. + - Skip unrecognized descriptors when importing archives rather than + aborting the entire import.
# Changes in version 4.2-1.6.1 - 2017-10-26 diff --git a/src/main/java/org/torproject/onionoo/updater/DescriptorSource.java b/src/main/java/org/torproject/onionoo/updater/DescriptorSource.java index d32727f..07ae4f8 100644 --- a/src/main/java/org/torproject/onionoo/updater/DescriptorSource.java +++ b/src/main/java/org/torproject/onionoo/updater/DescriptorSource.java @@ -170,9 +170,8 @@ public class DescriptorSource { if (descriptorType == null) { log.warn("Unrecognized descriptor in " + this.inArchiveDir.getAbsolutePath() + " with annotations " - + descriptor.getAnnotations() + ". Not reading any further" - + "archived descriptors."); - break; + + descriptor.getAnnotations() + ". Skipping descriptor."); + continue; } for (DescriptorListener descriptorListener : this.descriptorListeners.get(descriptorType)) {
tor-commits@lists.torproject.org