`T extends Object` is redundant in normal Java, and does not work to describe `T` as non-null across compilation boundaries when the Checker Framework unless you compile users against bytecode generated by the Checker Framework javac. (If you are building this code with the Checker Framework javac, then disable this check.)


The problem

T extends Object is redundant when using normal (non-Checker Framework checked) code.

However, T extends Object compiles to the same bytecode as T when using vanilla javac. So, when using Checker on vanilla javac’s bytecode, T extends Object does not imply non-null bounds outside the same compilation unit.


Suppress false positives by adding the suppression annotation @SuppressWarnings("ExtendsObject") to the enclosing element.