title: Pass a tab as an annotation parameter: "attribute value must be constant"
body: <p>I have a class containing multiple constants and I would like to return all the constants except one in order to make some tests. I have made a simple method but it return the error "attribute value must be constant" when I use it in my annotation.</p>
  
  <pre><code>public final class RolesConstants {
  
      public static final String APP_SYSTEM = "APP_SYSTEM";
      public static final String APP_CLIENT = "APP_CLIENT";
      public static final String APP_PROFESSIONAL = "APP_PROFESSIONAL";
      public static final String APP_ADMIN = "APP_ADMIN";
      public static final String PRO_ADMIN = "PRO_ADMIN";
      public static final String PRO_ADD_BOOKING = "PRO_ADD_BOOKING";
      public static final String PRO_EDIT_BOOKING = "PRO_EDIT_BOOKING";
      ...
  
      public static String[] allRolesButAPP_SYSTEM() {
          return new String[]{ APP_CLIENT, APP_PROFESSIONAL, ... };
      }
  }
  
  
  import org.springframework.security.test.context.support.WithMockUser;
  
  public class ProfessionalResourceIT {
  
      @WithMockUser(roles = {RolesConstants.allRolesButAPP_SYSTEM()})
      public void cannotGetIfNotSystem(){
          assertThat(...);
      }
  }
  </code></pre>
  
  <blockquote>
    <p>attribute value must be constant</p>
  </blockquote>