次のスニペットが実行された後、「zs」にはどのような値が期待されますか?
Collection<Integer> xs = Arrays.asList(1,2,3);
int[] ys = {1};
List<Integer> zs = new ArrayList<>(xs);
zs.removeAll(Arrays.asList(ys));
2 と 3 を含むリストを期待していました。ただし、Eclipse 4.5 M7 の JDK 1.8.0_25 では、1、2、3 を含むリストです。削除しても効果はありません。ただし、「ys」を非プリミティブ配列として指定すると、期待される結果が得られます。
Collection<Integer> xs = Arrays.asList(1,2,3);
Integer[] ys = {1};
List<Integer> zs = new ArrayList<>(xs);
zs.removeAll(Arrays.asList(ys));
何が起きてる?