Bring back this test: WithKeys's constructor begins with iterator().next().getClass() and it's not obvious to me that it can made to elegantly not knowing that class.

This commit is contained in:
Par Winzell
2010-02-25 18:48:24 +00:00
parent 0b8be77564
commit 6930ed5b40
@@ -198,8 +198,8 @@ public abstract class DepotRepository
public <T extends PersistentRecord> List<T> loadAll (Iterable<Key<T>> keys) public <T extends PersistentRecord> List<T> loadAll (Iterable<Key<T>> keys)
throws DatabaseException throws DatabaseException
{ {
return _ctx.invoke(new FindAllQuery.WithKeys<T>(_ctx, keys)); return Iterables.isEmpty(keys) ? Collections.<T>emptyList() :
} _ctx.invoke(new FindAllQuery.WithKeys<T>(_ctx, keys)); }
/** /**
* A varargs version of {@link #findAll(Class,Iterable)}. * A varargs version of {@link #findAll(Class,Iterable)}.