From 2e18b19d2044e245c009570e3435cf926c5a5a63 Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Wed, 11 Jul 2018 13:18:46 +0100 Subject: [PATCH] add empty constructors for easier testing --- .../src/main/groovy/com/muwire/hostcache/HostPool.groovy | 1 + host-cache/src/main/groovy/com/muwire/hostcache/Pinger.groovy | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/host-cache/src/main/groovy/com/muwire/hostcache/HostPool.groovy b/host-cache/src/main/groovy/com/muwire/hostcache/HostPool.groovy index f28f69a1..f9ffca6b 100644 --- a/host-cache/src/main/groovy/com/muwire/hostcache/HostPool.groovy +++ b/host-cache/src/main/groovy/com/muwire/hostcache/HostPool.groovy @@ -10,6 +10,7 @@ class HostPool { def verified = new HashMap() def unverified = new HashMap() + HostPool() {} HostPool(maxFailures, maxAge) { this.maxAge = maxAge this.maxFailures = maxFailures diff --git a/host-cache/src/main/groovy/com/muwire/hostcache/Pinger.groovy b/host-cache/src/main/groovy/com/muwire/hostcache/Pinger.groovy index 742f5d8f..f2cc76e5 100644 --- a/host-cache/src/main/groovy/com/muwire/hostcache/Pinger.groovy +++ b/host-cache/src/main/groovy/com/muwire/hostcache/Pinger.groovy @@ -7,13 +7,12 @@ import net.i2p.client.datagram.I2PDatagramMaker class Pinger { final def session - final def maker Pinger(session) { this.session = session - this.maker = new I2PDatagramMaker(session) } def ping(host, uuid) { + def maker = new I2PDatagramMaker(session) def payload = new HashMap() payload.type = "CrawlerPing" payload.version = 1