Have I found a bug in java.util.ArrayList.containsAll?
问题 In Java I've two lists: List<Satellite> sats = new ArrayList<Satellite>(); List<Satellite> sats2 = new ArrayList<Satellite>(); Satellite sat1 = new Satellite(); Satellite sat2 = new Satellite(); sats.add(sat1); sats2.add(sat1); sats2.add(sat2); When I do the following containsAll method on the first list: sats.containsAll(sats2); //Returns TRUE! It returns true. But the first List (sats) only contains 1 item and the second list contains 2. Therefor it's not even possible that the first list