Community
Participate
Working Groups
While get(...) performs a resolve, contains(...) is implemented in BasicEList and simply does a == comparison with the unresolved element. With this, EObject e = ...; // some resolved EObject EObjectResolvingEList l = ...; // list with exactly one proxy for e assertEquals(l.contains(e), l.iterator().next()==e); may fail because iterator().next() will internally call get(...) which calls resolve.
Contains is implemented in EcoreEList and it does resolves when == testing doesn't find the element in the list.