From 785a54acc12a884558c5a2f545a70ec7ed36143f Mon Sep 17 00:00:00 2001 From: Dmitry Donskoy Date: Fri, 22 Jun 2018 16:42:15 +0300 Subject: [PATCH] [android] Fixed review notes --- android/src/com/mapswithme/maps/discovery/Popularity.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/src/com/mapswithme/maps/discovery/Popularity.java b/android/src/com/mapswithme/maps/discovery/Popularity.java index 7e372f8969..85de4b7eec 100644 --- a/android/src/com/mapswithme/maps/discovery/Popularity.java +++ b/android/src/com/mapswithme/maps/discovery/Popularity.java @@ -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]; }