From 66106bdaf0733bcb6491ecd02ede342d9c9ac5d1 Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Tue, 5 Aug 2014 21:32:25 +0200 Subject: [PATCH] fix for crawler attribute maxdompages --- source/net/yacy/crawler/data/CrawlProfile.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/net/yacy/crawler/data/CrawlProfile.java b/source/net/yacy/crawler/data/CrawlProfile.java index 6002bd9ff..e0b705563 100644 --- a/source/net/yacy/crawler/data/CrawlProfile.java +++ b/source/net/yacy/crawler/data/CrawlProfile.java @@ -226,7 +226,13 @@ public class CrawlProfile extends ConcurrentHashMap implements M } public AtomicInteger getCount(final String domain) { - return this.doms.get(domain); + AtomicInteger dp = this.doms.get(domain); + if (dp == null) { + // new domain + dp = new AtomicInteger(0); + this.doms.put(domain, dp); + } + return dp; } /**