Use clear instead of iterating over everything
This commit is contained in:
parent
17fa7af792
commit
7751340c72
@ -5,7 +5,6 @@ import java.util.Collection;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
@ -219,12 +218,7 @@ public class Coll<E> implements CollInterface<E>
|
|||||||
JsonObject jfrom = (JsonObject)ofrom;
|
JsonObject jfrom = (JsonObject)ofrom;
|
||||||
JsonObject jto = (JsonObject)oto;
|
JsonObject jto = (JsonObject)oto;
|
||||||
// Clear To
|
// Clear To
|
||||||
Iterator<Entry<String, JsonElement>> iter = jto.entrySet().iterator();
|
jto.entrySet().clear();
|
||||||
while (iter.hasNext())
|
|
||||||
{
|
|
||||||
iter.next();
|
|
||||||
iter.remove();
|
|
||||||
}
|
|
||||||
// Copy
|
// Copy
|
||||||
for (Entry<String, JsonElement> entry : jfrom.entrySet())
|
for (Entry<String, JsonElement> entry : jfrom.entrySet())
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user