Collapse loops using the removeIf syntax
Change-Id: I9d51ad16f375541f6cd0a7f231d5f2771d7c3ef9
This commit is contained in:
		@@ -21,7 +21,6 @@ import com.google.common.collect.ImmutableList;
 | 
			
		||||
import com.google.common.collect.Maps;
 | 
			
		||||
import com.google.gerrit.metrics.Description;
 | 
			
		||||
import com.google.gerrit.metrics.Field;
 | 
			
		||||
import java.util.Iterator;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
import java.util.concurrent.ConcurrentHashMap;
 | 
			
		||||
 | 
			
		||||
@@ -67,12 +66,7 @@ abstract class BucketedCallback<V> implements BucketedMetric {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  void doPrune() {
 | 
			
		||||
    Iterator<Map.Entry<Object, ValueGauge>> i = cells.entrySet().iterator();
 | 
			
		||||
    while (i.hasNext()) {
 | 
			
		||||
      if (!i.next().getValue().set) {
 | 
			
		||||
        i.remove();
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
    cells.entrySet().removeIf(objectValueGaugeEntry -> !objectValueGaugeEntry.getValue().set);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  void doEndSet() {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user