Permalink
Browse files

Replace deprecated ConcurrentHashSet with recommended Java8

ConcurrentHashMap.newKeySet() in postprocessDocuments()
  • Loading branch information...
reger24 committed Aug 6, 2017
1 parent fb71994 commit e918ec199ef5a7ce28f4b4a08163d39e6a4f2578
Showing with 2 additions and 3 deletions.
  1. +2 −3 source/net/yacy/search/schema/CollectionConfiguration.java
@@ -54,7 +54,6 @@
import org.apache.solr.common.SolrException;
import org.apache.solr.common.SolrInputDocument;
import org.apache.solr.common.SolrInputField;
import org.eclipse.jetty.util.ConcurrentHashSet;
import net.yacy.cora.document.analysis.Classification;
import net.yacy.cora.document.analysis.Classification.ContentDomain;
@@ -1323,11 +1322,11 @@ private void postprocessDocuments(final Segment segment, final ReferenceReportCa
final CollectionConfiguration collection, final String collection1query, final Map<String, CRV> rankings,
final AtomicInteger allcount) {
final Map<String, Long> hostExtentCache = new HashMap<String, Long>(); // a mapping from the host id to the number of documents which contain this host-id
final Set<String> uniqueURLs = new ConcurrentHashSet<String>(); // will be used in a concurrent environment
final Set<String> uniqueURLs = ConcurrentHashMap.newKeySet(); // will be used in a concurrent environment
final Set<String> localOmitFields = new HashSet<String>();
localOmitFields.add(CollectionSchema.process_sxt.getSolrFieldName());
localOmitFields.add(CollectionSchema.harvestkey_s.getSolrFieldName());
final Collection<String> failids = new ConcurrentHashSet<String>();
final Collection<String> failids = ConcurrentHashMap.newKeySet();
final AtomicInteger countcheck = new AtomicInteger(0);
final AtomicInteger proccount = new AtomicInteger();
final AtomicInteger proccount_referencechange = new AtomicInteger();

0 comments on commit e918ec1

Please sign in to comment.