Commit d00b8ac0 authored by iwakeh's avatar iwakeh Committed by Karsten Loesing
Browse files

Changed 'descriptor.collector' default value to DescriptorIndexCollector.

Implements task-20404.
parent f7f56dd8
# Changes in version 1.?.? - 2016-1?-??
* Major changes
- Make the DescriptorCollector implementation that uses CollecTor's
index.json file to determine which descriptor files to fetch the
new default. Applications must provide gson-2.2.4.jar or higher
as dependency.
* Minor changes
- Avoid running into an IOException and logging a warning for it.
......
......@@ -72,7 +72,7 @@ public final class DescriptorSourceFactory {
* @since 1.0.0
*/
public static final String COLLECTOR_DEFAULT =
"org.torproject.descriptor.impl.DescriptorCollectorImpl";
"org.torproject.descriptor.index.DescriptorIndexCollector";
/**
* Property name for overriding the implementation of the
......
......@@ -9,10 +9,10 @@ import org.torproject.descriptor.DescriptorDownloader;
import org.torproject.descriptor.DescriptorParser;
import org.torproject.descriptor.DescriptorReader;
import org.torproject.descriptor.ImplementationNotAccessibleException;
import org.torproject.descriptor.impl.DescriptorCollectorImpl;
import org.torproject.descriptor.impl.DescriptorDownloaderImpl;
import org.torproject.descriptor.impl.DescriptorParserImpl;
import org.torproject.descriptor.impl.DescriptorReaderImpl;
import org.torproject.descriptor.index.DescriptorIndexCollector;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
......@@ -35,7 +35,7 @@ public class DescriptorSourceFactoryTest {
public void testDefaults() {
setProperties(defaults);
DescriptorCollector dc = DescriptorSourceFactory.createDescriptorCollector();
assertTrue(dc instanceof DescriptorCollectorImpl);
assertTrue(dc instanceof DescriptorIndexCollector);
DescriptorDownloader dd = DescriptorSourceFactory.createDescriptorDownloader();
assertTrue(dd instanceof DescriptorDownloaderImpl);
DescriptorParser dp = DescriptorSourceFactory.createDescriptorParser();
......@@ -101,7 +101,7 @@ public class DescriptorSourceFactoryTest {
}
class DummyCollectorImplementation extends DescriptorCollectorImpl {
class DummyCollectorImplementation extends DescriptorIndexCollector {
static int count;
public DummyCollectorImplementation() {
count++;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment