prevent array out of bound exception on getRankingProfile(x)

on faulty &profileNr=  query parameter
pull/1/head
reger 10 years ago
parent 970368359b
commit f96cfdc84d

@ -139,7 +139,7 @@ public class CollectionConfiguration extends SchemaConfiguration implements Seri
}
public Ranking getRanking(final int idx) {
return this.rankings.get(idx);
return this.rankings.get(idx % this.rankings.size()); // simply prevent out of bound exeption (& callers don't check for null)
}
public Ranking getRanking(final String name) {

Loading…
Cancel
Save