Changeset 31314 for other-projects

Show
Ignore:
Timestamp:
22.01.2017 00:14:48 (2 years ago)
Author:
davidb
Message:

Another go at avoiding concurrency update exception

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • other-projects/hathitrust/wcsa/extracted-features-solr/trunk/solr-ingest/src/main/java/org/hathitrust/extractedfeatures/PerVolumeMongoDBDocumentsMap.java

    r31313 r31314  
    5454    { 
    5555         
     56        Set<String> key_set = ef_count.keySet(); 
     57        String[] key_array = (String[])key_set.toArray(); 
     58         
    5659         
    5760        //Set<String> key_set = ef_count.keySet(); 
    5861        //for (String key : key_set) { 
    5962             
    60         Iterator<String> key_iterator = ef_count.keySet().iterator(); 
    61         while (key_iterator.hasNext()) { 
    62             String key = key_iterator.next(); 
     63        //Iterator<String> key_iterator = ef_count.keySet().iterator(); 
     64        //while (key_iterator.hasNext()) { 
     65        for (int i=0; i<key_array.length; i++) { 
     66             
     67            String key = key_array[i]; 
     68            //String key = key_iterator.next(); 
    6369            if (key.matches("\\.")) { 
    6470                String new_key = key.replaceAll("\\.", "<PERIOD>");