package bugIdeas;

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

import javax.annotation.meta.TypeQualifier;

import edu.umd.cs.findbugs.annotations.NoWarning;

public class Ideas_2011_01_17 {
    @Documented
    @TypeQualifier(applicableTo = Integer.class)
    @Retention(RetentionPolicy.RUNTIME)
    public @interface PK {
    }

    @PK int key = 17;
    @NoWarning("TQ")
    @PK int getKeyAsInt() {
        return key;
    }
    @NoWarning("TQ")
    @PK Integer getKeyAsInteger() {
        return key;
    }
    @NoWarning("TQ")
    void setKeyAsInt(@PK int key) {
        this.key = key;
    }
    @NoWarning("TQ")
    void setKeyAsInteger(@PK Integer key) {
        this.key = key;
    }
    @NoWarning("TQ")
    static void test(Ideas_2011_01_17 x, Ideas_2011_01_17 y) {
        x.setKeyAsInt(y.getKeyAsInt());
        x.setKeyAsInt(y.getKeyAsInteger());
        x.setKeyAsInteger(y.getKeyAsInt());
        x.setKeyAsInteger(y.getKeyAsInteger());
    }


}

Add test case for type qualifiers flowing across boxing/unboxing
Add test case for type qualifiers flowing across boxing/unboxing

git-svn-id: e7d6bde23f017c9ff4efd468d79d66def666766b@13101 eae3c2d3-9b19-0410-a86e-396b6ccb6ab3
