If there's nothing to query, don't query.

git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@352 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Par Winzell
2007-07-10 16:42:13 +00:00
parent 9b5d3cca12
commit 872d13660c
@@ -21,6 +21,7 @@
package com.threerings.parlor.rating.server.persist; package com.threerings.parlor.rating.server.persist;
import java.util.Collections;
import java.util.List; import java.util.List;
import com.samskivert.io.PersistenceException; import com.samskivert.io.PersistenceException;
@@ -65,6 +66,9 @@ public class RatingRepository extends DepotRepository
public List<RatingRecord> getRatings (int gameId, Integer... players) public List<RatingRecord> getRatings (int gameId, Integer... players)
throws PersistenceException throws PersistenceException
{ {
if (players.length == 0) {
return Collections.emptyList();
}
return findAll( return findAll(
RatingRecord.class, RatingRecord.class,
new Where(new And( new Where(new And(