title: Constant expression required in switch statement
body: <p>I want to use global constants in a switch statement. I wrote the constants in a Singleton called <code>ColorManager</code> in this way</p>
  
  <pre><code>public static final int blue = 3;
  public static final int red = 5;
  public static final int black = 7;
  </code></pre>
  
  <p>in my <code>HomeActivity</code> I wrote this code</p>
  
  <pre><code>public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) {
      ColorManager cm = ColorManager.getInstance(this);
      switch (requestCode) {
          case cm.blue: {
          }
          case cm.red: {
          }
          case cm.black: {
          }
      }
  }
  </code></pre>
  
  <p>But I get an error in the switch statement:  </p>
  
  <blockquote>
    <p>Constant expression required</p>
  </blockquote>
  
  <p>The values are final so constant, I don't understand why I get this error. I found similar topics but in all cases the properties was not declared as final.</p>