package customQualifiers;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.annotation.meta.Qualifier;
import javax.annotation.meta.When;

public class UseOfFooAnnotation {
	@Documented
	@Qualifier(strict=true)
	@Retention(RetentionPolicy.RUNTIME)
	public @interface Foo {	
		When when() default When.ALWAYS;
		ElementType[] applyTo() default {};
	}
	@Target(ElementType.TYPE)
	public @interface Foo2 {	
	}
	public static final @Foo int FOO1 = 1;
	public static final @Foo int FOO2 = 2;
	
	public static void main(String args[]) {
		int x1 = f(1); // error
		int x2 = f(FOO1); // OK
		int x3 = f2();
		System.out.println(x1+x2+x3);
		
	}
	public static int f(@Foo int y) { 
		return y;
	}

	public static @Foo int f2() {
		return 1; // error
	}
	

}

@@ -251,16 +251,20 @@
 on.meta.
+Type
 Qualifie
@@ -351,16 +351,20 @@
 ented%0A%09@
+Type
 Qualifie
@@ -368,21 +368,8 @@
 fier
-(strict=true)
 %0A%09@R
@@ -468,104 +468,11 @@
 S;%0A%09
-%09ElementType%5B%5D applyTo() default %7B%7D;%0A%09%7D%0A%09@Target(ElementType.TYPE)%0A%09public @interface Foo2 %7B%09%0A%09%7D
+%7D%0A%09
 %0A%09pu

fix FindBugs issue 2816457