[android] Fixed review notes

This commit is contained in:
Dmitry Donskoy 2018-06-22 16:42:15 +03:00 committed by Vlad Mihaylenko
parent e0eecf1c6b
commit 785a54acc1

View file

@ -10,8 +10,8 @@ public enum Popularity
@NonNull
public static Popularity makeInstance(int index)
{
if (index >= Popularity.values().length)
return Popularity.NOT_POPULAR;
if (index < 0 || index >= Popularity.values().length)
throw new AssertionError("Not found enum value for index = " + index);
return Popularity.values()[index];
}