IntelliJ's implementation of external annotations is excellent. They put @NotNull
annotations on JDK methods and warn on violations.
When browsing the JDK code, these annotations appear grayed out, but embedded in the code.
IntelliJ has @Flow
annotations that seem to be for tracking elements going in/out of collections.
Separate from annotations, IntelliJ's flow analysis is so good that it's often able to identify constant conditions in my code.
Putting this all together, I would expect that IntelliJ would be able to figure out that for collections where I never put null in, I'll never get null out. Yet that doesn't seem to happen.
Since IntelliJ doesn't already support some features I'd expect, I'm wondering if the kinds of warnings I'd want to see from tools are feasible.