chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Haag <alexander.h...@alfresco.com>
Subject Paging with OpenCMIS
Date Wed, 16 Oct 2013 11:58:53 GMT
Hello Community,

we are introducing the paging capability into our app, and run into a
behavior which is not very clear to us:

ItemIterable<CmisObject> children = ((Folder) obj).getChildren();
int count = 0;
for (CmisObject o : children)
{
count++;
}
int count2 = 0;
for (CmisObject o : children)
{
count2++;
}
assertEquals(count, count2);

And that simple test is failing since count2 will always be 0, that leads
to the assumption that ItemIterable is stateful. Reading the documentation
didn't bring any information to our conclusion.

One of the developers found following place:
org.apache.chemistry.opencmis.client.runtime.util.AbstractIterable.getIterator()
which is creating the stateful behavior.

Could someone clarify the behavior?
Comparing to the java-Iterable implementation it looks like a bug, but
maybe there is a reason for the behavior in OpenCMIS framework.

Kind Regards,
Alex

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message