ctolkmit / checker-framework

Automatically exported from code.google.com/p/checker-framework
0 stars 0 forks source link

Generic casting to @Untainted no longer working in 1.9 #431

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This used to work in 1.8:

class Test {

    void test(String str) {
        testUntainted(castUntainted(str));
    }

    void testUntainted(@Untainted String str) {
    }

    @SuppressWarnings("return.type.incompatible")
    public static <T> @Untainted T castUntainted(T obj) {
        return obj;
    }
}

It still works in 1.9 with the TaintingClassicChecker.

Original issue reported on code.google.com by trask.st...@gmail.com on 19 Apr 2015 at 7:50