I think just generally you have to be aware that it is not a concrete ArrayList (or whatever) that is being created. You have to be careful about which classes you are anonymously subclassing. If the superclass has an equals method, for instance, that follows the getClass().equals(compare.getClass()) approach as part of its logic you are screwed.