checker-framework
checker-framework copied to clipboard
Pluggable type-checking for Java
The Value Checker seems to have issues accessing constant fields that are initialized with a function but are not declared as `public`. If I try to compile this file: ```java...
Consider this code (which is in `checker/tests/index/StartsEndsWith.java`): ```java final String prefix; String propertyName(String methodName) { if (methodName.startsWith(prefix)) { String result = methodName.substring(prefix.length()); return result; } else { return null; }...
We need a way to suppress all initialization errors (but not the nullness checks). **Example**: ```java public final class InitTest { private String field; public InitTest() { init(); } private...
One is a lightweight checker that is independent of the Nullness Checker. It only checks properties # 2-7, not anything about nullness. (I need to figure out all the places...
Warn about code that triggers Javac bug: type annotations on anonymous classes cause broken bytecode
A javac bug generates broken bytecode for anonymous inner classes that are annotated with a type annotation. See: https://bugs.openjdk.java.net/browse/JDK-8059531 https://bugs.openjdk.java.net/browse/JDK-8177316 The Checker Framework should issue a warning if a user...
Eclipse and FindBugs support a `@ParametersAreNonnullByDefault` annotation. The Nullness Checker should treat it as an alias for `@DefaultQualifier(value = NonNull.class, locations = TypeUseLocation.PARAMETER)`. Thanks to Nick Wong for the suggestion.
Currently, the return type of `Map.keySet()` is `Set`, with `this` appropriately viewpoint-adapted. However, the keys should be `"this"` **and** all the keys on the receiver's key type. A test case...
This is a feature request for a `@ThrowsException` method annotation, which indicates that the annotated method throws an exception. This would be analogous to [`@TerminatesExecution`](https://checkerframework.org/api/org/checkerframework/dataflow/qual/TerminatesExecution.html), in that it would improve...
Consider this snippet: ``` import org.checkerframework.checker.index.qual.LessThan; import org.checkerframework.common.value.qual.IntRange; public class Testing { private static @IntRange(from = 0, to = 63) int firstNumber; private static void method() { @LessThan("this.firstNumber") int secondNumber...
Consider the following code: ```java import org.checkerframework.common.value.qual.*; import org.checkerframework.checker.index.qual.*; class ltlength{ public void check(int[] data, `@IndexFor`("#1") `@LTLengthOf`(value = {"#1"}, offset = {"1"}) int offset){ } } ``` Run it by...