Closed czajek closed 9 years ago
This is a tricky thing. The semantics of "containsOnlySuccess" is "contains at least one entry, and each entry is a success". If the list is empty, no success is contained. I know that this is a bit tricky. But you may use "containsNoFailure ()" instead which has a consistent semantic: this is true, if the list is empty or if only success is contained.
But of cause I will try to clarify this in the JavaDocs
// Philip
ResourceErrorGroup.containsOnlySuccess method returns false instead of true in first condition. If m_aErrors is empty, this method should return true.
public boolean containsOnlySuccess () { if (m_aErrors.isEmpty ()) return false; for (final IResourceError aError : m_aErrors) if (aError.isFailure ()) return false; return true; }