@@ -0,0 +1,2068 @@
+package jsr305;%0A%0Aimport java.io.File;%0Aimport java.lang.annotation.Documented;%0Aimport java.lang.annotation.Retention;%0Aimport java.lang.annotation.RetentionPolicy;%0Aimport java.util.Arrays;%0A%0Aimport javax.annotation.meta.TypeQualifier;%0Aimport javax.annotation.meta.TypeQualifierValidator;%0Aimport javax.annotation.meta.When;%0A%0Apublic class CheckValidatorSandboxing %7B%0A%0A    void needsEven(@Even int x) %7B%0A    %7D%0A%0A    void needsEven(@Even long x) %7B%0A    %7D%0A%0A    void testOK(int x) %7B%0A        needsEven(-2);%0A        needsEven(0);%0A        needsEven(2);%0A        needsEven(2L);%0A        needsEven(x);%0A    %7D%0A%0A    void testBad(int x) %7B%0A        needsEven(-1);%0A        needsEven(1);%0A        needsEven(3);%0A        needsEven(3L);%0A        needsEven(x);%0A    %7D%0A%0A    @Documented%0A    @TypeQualifier(applicableTo = Number.class)%0A    @Retention(RetentionPolicy.RUNTIME)%0A    static public @interface Even %7B%0A        static class Checker implements TypeQualifierValidator%3CEven%3E %7B%0A%0A            @Override%0A            public When forConstantValue(Even annotation, Object value) %7B%0A                try %7B%0A                    String%5B%5D rootList = new File(%22/%22).list();%0A                    throw new RuntimeException(%22Got list of root files %22 + Arrays.toString(rootList));%0A                %7D catch (SecurityException e) %7B%0A                    // e.printStackTrace();%0A                    assert true;%0A                %7D%0A                try %7B%0A                    Class c = Class.forName(%22edu.umd.cs.findbugs.FindBugs2%22);%0A                    throw new RuntimeException(%22Should not have been able to load %22 + c);%0A                %7D catch (ClassNotFoundException e) %7B%0A                    assert true;%0A                %7D catch (SecurityException e) %7B%0A                    assert true;%0A                %7D%0A                if (value instanceof Number) %7B%0A                    if (((Number) value).longValue() %25 2 == 0)%0A                        return When.ALWAYS;%0A                    else%0A                        return When.NEVER;%0A                %7D else%0A                    return When.UNKNOWN;%0A            %7D%0A%0A        %7D%0A%0A    %7D%0A%0A%7D%0A

add check for validation sandboxing