package com.mapswithme.maps.discovery;

import android.support.annotation.NonNull;

public enum Popularity
{
  NOT_POPULAR,
  POPULAR;

  @NonNull
  public static Popularity makeInstance(int index)
  {
    if (index < 0 || index >= Popularity.values().length)
      throw new AssertionError("Not found enum value for index = " + index);

    return Popularity.values()[index];
  }
}

@@ -216,47 +216,8 @@
  %3C 0
- %7C%7C index %3E= Popularity.values().length
 )%0A  
@@ -250,32 +250,26 @@
 or(%22
-Not found enum value for
+Incorrect negative
  ind
@@ -301,34 +301,41 @@
 urn 
-Popularity.values()%5Bindex%5D
+index %3E 0 ? POPULAR : NOT_POPULAR
 ;%0A  

fix crash on discovery screen