diff --git a/src/main/java/org/gcube/data/access/storagehub/handlers/VREQueryRetriever.java b/src/main/java/org/gcube/data/access/storagehub/handlers/VREQueryRetriever.java index 917634f..a7c315a 100644 --- a/src/main/java/org/gcube/data/access/storagehub/handlers/VREQueryRetriever.java +++ b/src/main/java/org/gcube/data/access/storagehub/handlers/VREQueryRetriever.java @@ -61,7 +61,8 @@ public class VREQueryRetriever implements Callable> { while (it.hasNext()) cachedList.add(ItemHandler.getItem(it.nextNode(), Arrays.asList("hl:accounting"))); logger.trace("creating objects took {}",System.currentTimeMillis()-start); - return cachedList.subList(0, 10); + if (cachedList.size()<=10) return cachedList; + else return cachedList.subList(0, 10); } catch (Exception e) { logger.error("error querying vre {}",vreFolder.getTitle(),e); throw new RuntimeException(e);