--- old/modules/graphics/src/main/java/com/sun/glass/ui/monocle/util/IntSet.java 2014-06-09 22:34:13.000000000 +0300 +++ new/modules/graphics/src/main/java/com/sun/glass/ui/monocle/util/IntSet.java 2014-06-09 22:34:13.000000000 +0300 @@ -42,7 +42,6 @@ elements = Arrays.copyOf(elements, size * 2); } if (insertionPoint != size) { - } else { System.arraycopy(elements, insertionPoint, elements, insertionPoint + 1, size - insertionPoint); @@ -124,7 +123,7 @@ /** Copies the contents of this set to the target set. */ public void copyTo(IntSet target) { - if (target.elements.length > size) { + if (target.elements.length < size) { target.elements = Arrays.copyOf(elements, elements.length); } else { System.arraycopy(elements, 0, target.elements, 0, size);