Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

fix for crawler attribute maxdompages

Michael Peter Christen66106bdaf073
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<String, String> 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;
}
/**